diff options
author | Tim Peters <tim.peters@gmail.com> | 2004-08-23 22:38:05 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2004-08-23 22:38:05 (GMT) |
commit | 4de7c5c10365edda9ee0cbf42cfa6a2e62118ba5 (patch) | |
tree | 2f1f3a9ece8c0e078ac6c3819d1fb3e78f773ef1 /Lib/test/test_doctest.py | |
parent | a7def72a081c5ea54f12b091a2d742eb7adef468 (diff) | |
download | cpython-4de7c5c10365edda9ee0cbf42cfa6a2e62118ba5.zip cpython-4de7c5c10365edda9ee0cbf42cfa6a2e62118ba5.tar.gz cpython-4de7c5c10365edda9ee0cbf42cfa6a2e62118ba5.tar.bz2 |
test_DocTestFinder(): This test failed when test_doctest was run
directly, due to assuming a filename specific to running tests "the
normal way". +ELLIPSIS to the rescue!
Diffstat (limited to 'Lib/test/test_doctest.py')
-rw-r--r-- | Lib/test/test_doctest.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Lib/test/test_doctest.py b/Lib/test/test_doctest.py index 1268e6a..d5e9ef5 100644 --- a/Lib/test/test_doctest.py +++ b/Lib/test/test_doctest.py @@ -280,8 +280,11 @@ We'll simulate a __file__ attr that ends in pyc: >>> print tests # doctest: +ELLIPSIS [<DocTest sample_func from ...:13 (1 example)>] - >>> tests[0].filename - 'test_doctest.py' +The exact name depends on how test_doctest was invoked, so allow for +leading path components. + + >>> tests[0].filename # doctest: +ELLIPSIS + '...test_doctest.py' >>> test.test_doctest.__file__ = old |