9
9
from distutils import log
10
10
from distutils .errors import DistutilsTemplateError
11
11
12
+ import pytest
13
+
12
14
from setuptools .command .egg_info import FileList , egg_info
13
15
from setuptools .dist import Distribution
14
16
from setuptools .extern import six
15
17
from setuptools .tests .textwrap import DALS
16
18
17
- import pytest
18
-
19
19
py3_only = pytest .mark .xfail (six .PY2 , reason = "Test runs on Python 3 only" )
20
20
21
21
@@ -137,7 +137,7 @@ def get_files(self):
137
137
138
138
def test_no_manifest (self ):
139
139
"""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 ()
141
141
142
142
def test_empty_files (self ):
143
143
"""Check an empty MANIFEST.in includes only the standard files."""
@@ -147,8 +147,8 @@ def test_empty_files(self):
147
147
def test_include (self ):
148
148
"""Include extra rst files in the project root."""
149
149
self .make_manifest ("include *.rst" )
150
- files = default_files | {
151
- 'testing.rst' , '.hidden.rst' }
150
+ files = default_files | set ([
151
+ 'testing.rst' , '.hidden.rst' ])
152
152
assert files == self .get_files ()
153
153
154
154
def test_exclude (self ):
@@ -159,26 +159,26 @@ def test_exclude(self):
159
159
include app/*
160
160
exclude app/*.txt
161
161
""" )
162
- files = default_files | { l ('app/c.rst' )}
162
+ files = default_files | set ([ l ('app/c.rst' )])
163
163
assert files == self .get_files ()
164
164
165
165
def test_include_multiple (self ):
166
166
"""Include with multiple patterns."""
167
167
l = make_local_path
168
168
self .make_manifest ("include app/*.txt app/static/*" )
169
- files = default_files | {
169
+ files = default_files | set ([
170
170
l ('app/a.txt' ), l ('app/b.txt' ),
171
171
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' )])
173
173
assert files == self .get_files ()
174
174
175
175
def test_graft (self ):
176
176
"""Include the whole app/static/ directory."""
177
177
l = make_local_path
178
178
self .make_manifest ("graft app/static" )
179
- files = default_files | {
179
+ files = default_files | set ([
180
180
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' )])
182
182
assert files == self .get_files ()
183
183
184
184
def test_graft_global_exclude (self ):
@@ -189,8 +189,8 @@ def test_graft_global_exclude(self):
189
189
graft app/static
190
190
global-exclude *.map
191
191
""" )
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' )])
194
194
assert files == self .get_files ()
195
195
196
196
def test_global_include (self ):
@@ -200,9 +200,9 @@ def test_global_include(self):
200
200
"""
201
201
global-include *.rst *.js *.css
202
202
""" )
203
- files = default_files | {
203
+ files = default_files | set ([
204
204
'.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' )])
206
206
assert files == self .get_files ()
207
207
208
208
def test_graft_prune (self ):
@@ -213,8 +213,8 @@ def test_graft_prune(self):
213
213
graft app
214
214
prune app/static
215
215
""" )
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' )])
218
218
assert files == self .get_files ()
219
219
220
220
@@ -311,7 +311,7 @@ def test_process_template_line(self):
311
311
continue
312
312
file_list .process_template_line (line )
313
313
314
- wanted = {
314
+ wanted = set ([
315
315
'ok' , 'four.txt' ,
316
316
'buildout.cfg' ,
317
317
l ('.hg/last-message.txt' ),
@@ -320,7 +320,7 @@ def test_process_template_line(self):
320
320
l ('f/o/f.oo' ),
321
321
l ('dir/graft-one' ),
322
322
l ('dir/dir2/graft2' ),
323
- }
323
+ ])
324
324
325
325
assert set (file_list .files ) == wanted
326
326
0 commit comments