Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
bb11c3c9
Commit
bb11c3c9
authored
Nov 22, 2017
by
Victor Stinner
Committed by
GitHub
Nov 22, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bpo-31324: Fix test.support.set_match_tests(None) (#4505)
parent
803ddd8c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
0 deletions
+7
-0
Lib/test/support/__init__.py
Lib/test/support/__init__.py
+2
-0
Lib/test/test_support.py
Lib/test/test_support.py
+5
-0
No files found.
Lib/test/support/__init__.py
View file @
bb11c3c9
...
...
@@ -1931,6 +1931,8 @@ def set_match_tests(patterns):
if
not
patterns
:
func
=
None
# set_match_tests(None) behaves as set_match_tests(())
patterns
=
()
elif
all
(
map
(
_is_full_match_test
,
patterns
)):
# Simple case: all patterns are full test identifier.
# The test.bisect utility only uses such full test identifiers.
...
...
Lib/test/test_support.py
View file @
bb11c3c9
...
...
@@ -500,6 +500,11 @@ class TestSupport(unittest.TestCase):
self
.
assertTrue
(
support
.
match_test
(
test_access
))
self
.
assertTrue
(
support
.
match_test
(
test_chdir
))
# match all using None
support
.
set_match_tests
(
None
)
self
.
assertTrue
(
support
.
match_test
(
test_access
))
self
.
assertTrue
(
support
.
match_test
(
test_chdir
))
# match the full test identifier
support
.
set_match_tests
([
test_access
.
id
()])
self
.
assertTrue
(
support
.
match_test
(
test_access
))
...
...
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