Closed gergelypolonkai closed 8 years ago
Makes sense - thanks @gergelypolonkai.
Any chance you can add a test, to protect against regressions if, say, unittest
changes its exception path or name?
How about this?
if name.startswith('unittest.loader.'):
name = '.'.join(name.split('.')[3:])
This won’t work if the exception gets higher or deeper in the module hierarchy, though…
We can be pretty sure the unittest.
part will be the same forever(ish), but the remaining parts of the path seems almost undetectable to me. But if you have any ideas, I’m willing to implement it.
I didn’t intend to close this, as the solution didn’t get merged. Or did it?
I don't think this has been merged yet, no - I can't reopen as it wasn't my PR
Me neither, as it says “There are no new commits on the gergelypolonkai:master branch”. Reopened it as #23.
Possible fix for #1
Signed-off-by: Gergely Polonkai gergely@polonkai.eu