summaryrefslogtreecommitdiff
path: root/coverage/context.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2019-04-26 13:57:49 -0400
committerNed Batchelder <ned@nedbatchelder.com>2019-04-26 13:57:49 -0400
commit792e2fccac3afc83bf46c65ceabd2b0ab7e692ab (patch)
tree9037ee3b0f86ae74f3dd0fdc0d542f48b196b49c /coverage/context.py
parent59208c20ee0d312bc0da16e8d143ed8b70ec5079 (diff)
downloadpython-coveragepy-git-792e2fccac3afc83bf46c65ceabd2b0ab7e692ab.tar.gz
Old-style classes can report the test_function name. #797
Diffstat (limited to 'coverage/context.py')
-rw-r--r--coverage/context.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/coverage/context.py b/coverage/context.py
index 22c0e531..13800337 100644
--- a/coverage/context.py
+++ b/coverage/context.py
@@ -65,7 +65,7 @@ def qualname_from_frame(frame):
if hasattr(func, '__qualname__'):
qname = func.__qualname__
else:
- for cls in self.__class__.__mro__:
+ for cls in getattr(self.__class__, '__mro__', ()):
f = cls.__dict__.get(fname, None)
if f is None:
continue