-
-
Notifications
You must be signed in to change notification settings - Fork 33.2k
bpo-35767: Fix unittest.loader to allow partials as test_functions [3.7] #11600
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This LGTM. Thank you!
Lib/unittest/test/test_loader.py
Outdated
self.assertEqual(loader.getTestCaseNames(Foo), test_names) | ||
|
||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor nit: Extra blank line?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep just removed the extra blank line.
removed an extra newline
@ambv: Please replace |
…ythonGH-11600) (cherry picked from commit fd628cf) Co-authored-by: Jason Fried <me@jasonfried.info>
GH-11662 is a backport of this pull request to the 3.7 branch. |
if not callable(testFunc): | ||
return False | ||
fullName = '%s.%s' % (testCaseClass.__module__, testFunc.__qualname__) | ||
fullName = f'%s.%s.%s' % ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The f-string is superfluous here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch, it didn't wrap well as an f string, forgot to remove the f.
This was a regression I first noticed in 3.7 branch.
https://bugs.python.org/issue35767