Skip to content

Commit 6d8ea8f

Browse files
committed
Catch TypeError on inspect calls (fixes #188)
1 parent d6190d4 commit 6d8ea8f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

xmlrunner/result.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,8 @@ def startTest(self, test):
271271
# Handle partial and partialmethod objects.
272272
test_method = getattr(test_method, 'func', test_method)
273273
_, self.lineno = inspect.getsourcelines(test_method)
274-
finally:
274+
except TypeError:
275+
# issue #188, some frameworks can make test method opaque.
275276
pass
276277

277278
if self.showAll:

0 commit comments

Comments
 (0)