diff options
-rw-r--r-- | machineout.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/machineout.py b/machineout.py index 7609abf..c5144ea 100644 --- a/machineout.py +++ b/machineout.py | |||
@@ -49,7 +49,12 @@ class NoseMachineReadableOutput(Plugin): | |||
49 | try: | 49 | try: |
50 | while True: | 50 | while True: |
51 | fname, lineno, funname, msg = fulltb.pop() | 51 | fname, lineno, funname, msg = fulltb.pop() |
52 | if fname.startswith(self.basepath): | 52 | |
53 | # The check for the `assert' prefix allows the user to extend | ||
54 | # unittest.TestCase with custom assert-methods, while | ||
55 | # machineout still returns the most useful error line number. | ||
56 | if fname.startswith(self.basepath) \ | ||
57 | and not funname.startswith('assert'): | ||
53 | break | 58 | break |
54 | except IndexError: | 59 | except IndexError: |
55 | fname, lineno, funname, msg = fallback | 60 | fname, lineno, funname, msg = fallback |