summaryrefslogtreecommitdiff
path: root/testing/test_doctest.py
diff options
context:
space:
mode:
authorWilliam Lee <wl1012@yahoo.com>2018-02-23 21:20:14 -0600
committerWilliam Lee <wl1012@yahoo.com>2018-02-23 21:20:14 -0600
commit7f2dd74ae9ba23cc8c8a33e933b87df9bf708be0 (patch)
tree8e0a71d43b60f52925087aaf276d6cb35b19ccfc /testing/test_doctest.py
parent8d90591b3305a245df318e2c78dd3fa27839ecad (diff)
downloadpytest-7f2dd74ae9ba23cc8c8a33e933b87df9bf708be0.tar.gz
Fixed test for the continue run
Diffstat (limited to 'testing/test_doctest.py')
-rw-r--r--testing/test_doctest.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/testing/test_doctest.py b/testing/test_doctest.py
index 8c8f45224..931279820 100644
--- a/testing/test_doctest.py
+++ b/testing/test_doctest.py
@@ -769,11 +769,13 @@ class TestDoctestSkips(object):
""")
result = testdir.runpytest("--doctest-modules")
result.assert_outcomes(passed=0, failed=1)
- # We need to make sure we have two failure lines (4, 5, and 8) instead of
- # one.
- result.stdout.fnmatch_lines("*test_something.txt:4: DoctestUnexpectedException*")
- result.stdout.fnmatch_lines("*test_something.txt:5: DocTestFailure*")
- result.stdout.fnmatch_lines("*test_something.txt:8: DocTestFailure*")
+ # The lines that contains the failure are 4, 5, and 8. The first one
+ # is a stack trace and the other two are mismatches.
+ result.stdout.fnmatch_lines([
+ "*4: UnexpectedException*",
+ "*5: DocTestFailure*",
+ "*8: DocTestFailure*",
+ ])
class TestDoctestAutoUseFixtures(object):