def test_doctest_unexpected_exception(self, testdir):
    testdir.maketxtfile('\n            >>> i = 0\n            >>> 0 / i\n            2\n        ')
    result = testdir.runpytest('--doctest-modules')
    result.stdout.fnmatch_lines(['*unexpected_exception*', '*>>> i = 0*', '*>>> 0 / i*', '*UNEXPECTED*ZeroDivision*'])
def test_doctest_unexpected_exception(self, testdir):
    testdir.maketxtfile('\n            >>> i = 0\n            >>> 0 / i\n            2\n        ')
    result = testdir.runpytest('--doctest-modules')
    result.stdout.fnmatch_lines(['*unexpected_exception*', '*>>> i = 0*', '*>>> 0 / i*', '*UNEXPECTED*ZeroDivision*'])