Add test for command line usage

--HG--
branch : ignore-doctest-import-errors
This commit is contained in:
Phillip Cloud 2015-02-26 12:39:36 -05:00
parent f2ca0b8170
commit c773ea664b
1 changed files with 16 additions and 0 deletions

View File

@ -349,3 +349,19 @@ class TestDoctests:
""")
reprec = testdir.inline_run(p, "--doctest-glob=x*.txt")
reprec.assertoutcome(failed=1, passed=0)
def test_ignore_import_errors_on_doctest(self, testdir):
p = testdir.makepyfile("""
import asdf
def add_one(x):
'''
>>> add_one(1)
2
'''
return x + 1
""")
reprec = testdir.inline_run(p, "--doctest-modules",
"--doctest-ignore-import-errors")
reprec.assertoutcome(skipped=1, failed=1, passed=0)