From 792e2fccac3afc83bf46c65ceabd2b0ab7e692ab Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Fri, 26 Apr 2019 13:57:49 -0400 Subject: Old-style classes can report the test_function name. #797 --- coverage/context.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'coverage/context.py') 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 -- cgit v1.2.1