From b528c1e91d56761e7ca89074164859f26bfdd7f3 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Fri, 28 Sep 2018 20:31:42 -0400 Subject: Deal with properties in qualname_from_frame --- coverage/context.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'coverage/context.py') diff --git a/coverage/context.py b/coverage/context.py index f167de36..c3416208 100644 --- a/coverage/context.py +++ b/coverage/context.py @@ -31,7 +31,10 @@ def qualname_from_frame(frame): if method is None: return fname - func = method.__func__ + func = getattr(method, '__func__', None) + if func is None: + return fname + if hasattr(func, '__qualname__'): qname = func.__qualname__ else: -- cgit v1.2.1