mirror of
https://github.com/python/cpython.git
synced 2025-07-12 13:55:34 +00:00
bpo-32071: Fix regression and add What's New entry (#4589)
* bpo-32071: Fix an undocumented behaviour regression * bpo-32071: Add 3.7 release note entry for unittest -k
This commit is contained in:
parent
a489599793
commit
4d193bcc25
3 changed files with 35 additions and 2 deletions
|
@ -224,9 +224,10 @@ class TestLoader(object):
|
|||
"""Return a sorted sequence of method names found within testCaseClass
|
||||
"""
|
||||
def shouldIncludeMethod(attrname):
|
||||
if not attrname.startswith(self.testMethodPrefix):
|
||||
return False
|
||||
testFunc = getattr(testCaseClass, attrname)
|
||||
isTestMethod = attrname.startswith(self.testMethodPrefix) and callable(testFunc)
|
||||
if not isTestMethod:
|
||||
if not callable(testFunc):
|
||||
return False
|
||||
fullName = '%s.%s' % (testCaseClass.__module__, testFunc.__qualname__)
|
||||
return self.testNamePatterns is None or \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue