summaryrefslogtreecommitdiffstats
path: root/Lib/unittest/loader.py
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2013-04-11 12:58:11 (GMT)
committerR David Murray <rdmurray@bitdance.com>2013-04-11 12:58:11 (GMT)
commitc601dc163932009b5d9f4e73eaa4204c2d47c468 (patch)
treeb2b69f25a9cf3de86f727495e2d52bff9267fb95 /Lib/unittest/loader.py
parentf4216eacd9870191fd791a50a43b90c393349ad4 (diff)
parent5e2f59314588f4d263fe728ee8ba7da92f3439a0 (diff)
downloadcpython-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.py2
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):