Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
setuptools
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jérome Perrin
setuptools
Commits
a4eb1127
Commit
a4eb1127
authored
Jul 01, 2020
by
Jason R. Coombs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix failing test in test_fileutil by adapting expectation based on Python version.
parent
253d03ca
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
1 deletion
+13
-1
distutils/tests/py35compat.py
distutils/tests/py35compat.py
+9
-0
distutils/tests/test_filelist.py
distutils/tests/test_filelist.py
+4
-1
No files found.
distutils/tests/py35compat.py
View file @
a4eb1127
...
@@ -66,3 +66,12 @@ vars(subprocess).setdefault(
...
@@ -66,3 +66,12 @@ vars(subprocess).setdefault(
'_optim_args_from_interpreter_flags'
,
'_optim_args_from_interpreter_flags'
,
_optim_args_from_interpreter_flags
,
_optim_args_from_interpreter_flags
,
)
)
def
adapt_glob
(
regex
):
"""
Supply legacy expectation on Python 3.5
"""
if
sys
.
version_info
>
(
3
,
6
):
return
regex
return
regex
.
replace
(
'(?s:'
,
''
).
replace
(
r')\
Z
', r'
\
Z
(
?
ms
)
')
distutils/tests/test_filelist.py
View file @
a4eb1127
...
@@ -12,6 +12,9 @@ import test.support
...
@@ -12,6 +12,9 @@ import test.support
from
test.support
import
captured_stdout
,
run_unittest
from
test.support
import
captured_stdout
,
run_unittest
from
distutils.tests
import
support
from
distutils.tests
import
support
from
.py35compat
import
adapt_glob
MANIFEST_IN
=
"""
\
MANIFEST_IN
=
"""
\
include ok
include ok
include xo
include xo
...
@@ -60,7 +63,7 @@ class FileListTestCase(support.LoggingSilencer,
...
@@ -60,7 +63,7 @@ class FileListTestCase(support.LoggingSilencer,
('
foo
????
', r'
(
?
s
:
foo
[
^%
(
sep
)
s
][
^%
(
sep
)
s
][
^%
(
sep
)
s
][
^%
(
sep
)
s
])
\
Z
'),
('
foo
????
', r'
(
?
s
:
foo
[
^%
(
sep
)
s
][
^%
(
sep
)
s
][
^%
(
sep
)
s
][
^%
(
sep
)
s
])
\
Z
'),
(r'
foo
\\
??
', r'
(
?
s
:
foo
\\\\
[
^%
(
sep
)
s
][
^%
(
sep
)
s
])
\
Z
')):
(r'
foo
\\
??
', r'
(
?
s
:
foo
\\\\
[
^%
(
sep
)
s
][
^%
(
sep
)
s
])
\
Z
')):
regex = regex % {'
sep
': sep}
regex = regex % {'
sep
': sep}
self.assertEqual(glob_to_re(glob),
regex
)
self.assertEqual(glob_to_re(glob),
adapt_glob(regex)
)
def test_process_template_line(self):
def test_process_template_line(self):
# testing all MANIFEST.in template patterns
# testing all MANIFEST.in template patterns
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment