doctests/unittest problem with exception

Paul aquagnu at
Sat Jan 26 04:31:41 CET 2013

Hello. I converted doctests into DocTestSuite() to use with unittest. And try it under Python 3.

And, sure, I get errors with unmatched exceptions details (mismatched name of exception class: a.b.c.MyError instead of MyError). So, I have 2 questions:

1) how to turn on option IGNORE_EXCEPTION_DETAIL for all doctests in DocStestSuite (like 'optionflags' argument in doctest.testmod())

2) Is a way to ignore all 'package path' of exception but not message? Something like:
        Traceback (most recent call last):
        ...MyError: 'details are not ignored!'
see, ellipsis-prefix in MyError

More information about the Python-list mailing list