summaryrefslogtreecommitdiffstats
path: root/Doc/lib
diff options
context:
space:
mode:
authorBrett Cannon <bcannon@gmail.com>2004-07-13 07:12:25 (GMT)
committerBrett Cannon <bcannon@gmail.com>2004-07-13 07:12:25 (GMT)
commitee86a66dd87787e54772c93c961fa611311b1502 (patch)
tree3a1ac7b11c35c9239d7744dc6df1c7a546994e20 /Doc/lib
parent71868e74d6f052cc79fec676ce6d3ad02d227913 (diff)
downloadcpython-ee86a66dd87787e54772c93c961fa611311b1502.zip
cpython-ee86a66dd87787e54772c93c961fa611311b1502.tar.gz
cpython-ee86a66dd87787e54772c93c961fa611311b1502.tar.bz2
Fixes a bug in testing code handling .pth files that did not restore the original
module that is removed for testing "import" lines. Originally deleted the entry from sys.modules and then just let other code that needed it to import it again. Problem with this solution is that it lead to code that had already imported the module in question to have their own reference to a new copy of the module in question that new code couldn't reach. This lead to a failure in test_strptime since it monkey-patched the 'time' module it had a reference to while _strptime had its own reference to another copy of 'time' from being imported by test___all__ that it was using for a calculation. Also moved the testing code out of the PthFile class and into the actual test class. This was to stop using 'assert' which is useless with a -O execution.
Diffstat (limited to 'Doc/lib')
0 files changed, 0 insertions, 0 deletions