From: Tim Peters Date: Mon, 23 Aug 2004 22:38:05 +0000 (+0000) Subject: test_DocTestFinder(): This test failed when test_doctest was run X-Git-Tag: v2.4a3~143 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4de7c5c10365edda9ee0cbf42cfa6a2e62118ba5;p=thirdparty%2FPython%2Fcpython.git 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! --- diff --git a/Lib/test/test_doctest.py b/Lib/test/test_doctest.py index 1268e6a29b91..d5e9ef50d45a 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 [] - >>> 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