def test_doctest_unex_importerror_with_module(self, testdir):
    testdir.tmpdir.join('hello.py').write(textwrap.dedent('                import asdalsdkjaslkdjasd\n                '))
    testdir.maketxtfile('\n            >>> import hello\n            >>>\n        ')
    result = testdir.runpytest('--doctest-modules')
    result.stdout.fnmatch_lines(['*ERROR collecting hello.py*', '*{e}: No module named *asdals*'.format(e=MODULE_NOT_FOUND_ERROR), '*Interrupted: 1 error during collection*'])
def test_doctest_unex_importerror_with_module(self, testdir):
    testdir.tmpdir.join('hello.py').write(textwrap.dedent('                import asdalsdkjaslkdjasd\n                '))
    testdir.maketxtfile('\n            >>> import hello\n            >>>\n        ')
    result = testdir.runpytest('--doctest-modules')
    result.stdout.fnmatch_lines(['*ERROR collecting hello.py*', '*{e}: No module named *asdals*'.format(e=MODULE_NOT_FOUND_ERROR), '*Interrupted: 1 error during collection*'])