]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Add a missing check before deleting a package's __loader__.
authorBrett Cannon <bcannon@gmail.com>
Wed, 21 Nov 2007 00:58:03 +0000 (00:58 +0000)
committerBrett Cannon <bcannon@gmail.com>
Wed, 21 Nov 2007 00:58:03 +0000 (00:58 +0000)
Lib/test/test_doctest.py

index e96785cb04e61329bda82fdf0b526f856ce463b4..f53a7595af6310eab6df7fbde103741a4b325459 100644 (file)
@@ -1922,7 +1922,8 @@ def test_DocFileSuite():
          ...                                  package='test')
          ...     suite.run(unittest.TestResult())
          ... finally:
-         ...     del test.__loader__
+         ...     if added_loader:
+         ...         del test.__loader__
          <unittest.TestResult run=3 errors=0 failures=3>
 
        '/' should be used as a path separator.  It will be converted