diff options
author | R David Murray <rdmurray@bitdance.com> | 2013-04-11 12:58:11 (GMT) |
---|---|---|
committer | R David Murray <rdmurray@bitdance.com> | 2013-04-11 12:58:11 (GMT) |
commit | c601dc163932009b5d9f4e73eaa4204c2d47c468 (patch) | |
tree | b2b69f25a9cf3de86f727495e2d52bff9267fb95 /Lib/unittest/loader.py | |
parent | f4216eacd9870191fd791a50a43b90c393349ad4 (diff) | |
parent | 5e2f59314588f4d263fe728ee8ba7da92f3439a0 (diff) | |
download | cpython-c601dc163932009b5d9f4e73eaa4204c2d47c468.zip cpython-c601dc163932009b5d9f4e73eaa4204c2d47c468.tar.gz cpython-c601dc163932009b5d9f4e73eaa4204c2d47c468.tar.bz2 |
Merge #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 25a9122..ad89cd0 100644 --- a/Lib/unittest/loader.py +++ b/Lib/unittest/loader.py @@ -119,7 +119,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): |