diff options
author | R David Murray <rdmurray@bitdance.com> | 2013-04-11 08:55:45 -0400 |
---|---|---|
committer | R David Murray <rdmurray@bitdance.com> | 2013-04-11 08:55:45 -0400 |
commit | 5e2f59314588f4d263fe728ee8ba7da92f3439a0 (patch) | |
tree | 642f00b3b7ddf0592014f8ba068605546dfebb83 /Lib/unittest/loader.py | |
parent | normalize whitespace (diff) | |
download | cpython-5e2f59314588f4d263fe728ee8ba7da92f3439a0.tar.gz cpython-5e2f59314588f4d263fe728ee8ba7da92f3439a0.tar.bz2 cpython-5e2f59314588f4d263fe728ee8ba7da92f3439a0.zip |
#14971: Use class method name, not function.__name__, during unittest discovery.
Diffstat (limited to 'Lib/unittest/loader.py')
-rw-r--r-- | Lib/unittest/loader.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/unittest/loader.py b/Lib/unittest/loader.py index 541884e4161..2b925254231 100644 --- a/Lib/unittest/loader.py +++ b/Lib/unittest/loader.py @@ -111,7 +111,7 @@ class TestLoader(object): elif (isinstance(obj, types.FunctionType) and isinstance(parent, type) and issubclass(parent, case.TestCase)): - name = obj.__name__ + name = parts[-1] inst = parent(name) # static methods follow a different path if not isinstance(getattr(inst, name), types.FunctionType): |