Skip to content

Commit b3b9c65

Browse files
committed
Do not use set literal syntax
1 parent 753cd1d commit b3b9c65

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

setuptools/tests/test_manifest.py

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@
99
from distutils import log
1010
from distutils.errors import DistutilsTemplateError
1111

12+
import pytest
13+
1214
from setuptools.command.egg_info import FileList, egg_info
1315
from setuptools.dist import Distribution
1416
from setuptools.extern import six
1517
from setuptools.tests.textwrap import DALS
1618

17-
import pytest
18-
1919
py3_only = pytest.mark.xfail(six.PY2, reason="Test runs on Python 3 only")
2020

2121

@@ -137,7 +137,7 @@ def get_files(self):
137137

138138
def test_no_manifest(self):
139139
"""Check a missing MANIFEST.in includes only the standard files."""
140-
assert (default_files - {'MANIFEST.in'}) == self.get_files()
140+
assert (default_files - set(['MANIFEST.in'])) == self.get_files()
141141

142142
def test_empty_files(self):
143143
"""Check an empty MANIFEST.in includes only the standard files."""
@@ -147,8 +147,8 @@ def test_empty_files(self):
147147
def test_include(self):
148148
"""Include extra rst files in the project root."""
149149
self.make_manifest("include *.rst")
150-
files = default_files | {
151-
'testing.rst', '.hidden.rst'}
150+
files = default_files | set([
151+
'testing.rst', '.hidden.rst'])
152152
assert files == self.get_files()
153153

154154
def test_exclude(self):
@@ -159,26 +159,26 @@ def test_exclude(self):
159159
include app/*
160160
exclude app/*.txt
161161
""")
162-
files = default_files | {l('app/c.rst')}
162+
files = default_files | set([l('app/c.rst')])
163163
assert files == self.get_files()
164164

165165
def test_include_multiple(self):
166166
"""Include with multiple patterns."""
167167
l = make_local_path
168168
self.make_manifest("include app/*.txt app/static/*")
169-
files = default_files | {
169+
files = default_files | set([
170170
l('app/a.txt'), l('app/b.txt'),
171171
l('app/static/app.js'), l('app/static/app.js.map'),
172-
l('app/static/app.css'), l('app/static/app.css.map')}
172+
l('app/static/app.css'), l('app/static/app.css.map')])
173173
assert files == self.get_files()
174174

175175
def test_graft(self):
176176
"""Include the whole app/static/ directory."""
177177
l = make_local_path
178178
self.make_manifest("graft app/static")
179-
files = default_files | {
179+
files = default_files | set([
180180
l('app/static/app.js'), l('app/static/app.js.map'),
181-
l('app/static/app.css'), l('app/static/app.css.map')}
181+
l('app/static/app.css'), l('app/static/app.css.map')])
182182
assert files == self.get_files()
183183

184184
def test_graft_global_exclude(self):
@@ -189,8 +189,8 @@ def test_graft_global_exclude(self):
189189
graft app/static
190190
global-exclude *.map
191191
""")
192-
files = default_files | {
193-
l('app/static/app.js'), l('app/static/app.css')}
192+
files = default_files | set([
193+
l('app/static/app.js'), l('app/static/app.css')])
194194
assert files == self.get_files()
195195

196196
def test_global_include(self):
@@ -200,9 +200,9 @@ def test_global_include(self):
200200
"""
201201
global-include *.rst *.js *.css
202202
""")
203-
files = default_files | {
203+
files = default_files | set([
204204
'.hidden.rst', 'testing.rst', l('app/c.rst'),
205-
l('app/static/app.js'), l('app/static/app.css')}
205+
l('app/static/app.js'), l('app/static/app.css')])
206206
assert files == self.get_files()
207207

208208
def test_graft_prune(self):
@@ -213,8 +213,8 @@ def test_graft_prune(self):
213213
graft app
214214
prune app/static
215215
""")
216-
files = default_files | {
217-
l('app/a.txt'), l('app/b.txt'), l('app/c.rst')}
216+
files = default_files | set([
217+
l('app/a.txt'), l('app/b.txt'), l('app/c.rst')])
218218
assert files == self.get_files()
219219

220220

@@ -311,7 +311,7 @@ def test_process_template_line(self):
311311
continue
312312
file_list.process_template_line(line)
313313

314-
wanted = {
314+
wanted = set([
315315
'ok', 'four.txt',
316316
'buildout.cfg',
317317
l('.hg/last-message.txt'),
@@ -320,7 +320,7 @@ def test_process_template_line(self):
320320
l('f/o/f.oo'),
321321
l('dir/graft-one'),
322322
l('dir/dir2/graft2'),
323-
}
323+
])
324324

325325
assert set(file_list.files) == wanted
326326

0 commit comments

Comments
 (0)