]> granicus.if.org Git - python/commit
test_pty started failing on Windows, but if and only if test___all__ was
authorTim Peters <tim.peters@gmail.com>
Mon, 12 Feb 2001 03:27:31 +0000 (03:27 +0000)
committerTim Peters <tim.peters@gmail.com>
Mon, 12 Feb 2001 03:27:31 +0000 (03:27 +0000)
commit76c066b103c23702d328aa9056c65d02abb8a3ac
tree5f6fb7a7cf233e158ba457c8ddb5176b3fa414b1
parentc62c81e013fbc9a726493870c3624b60ae63a757
test_pty started failing on Windows, but if and only if test___all__ was
run first.  Indirectly due to Skip adding check_all("pty") to test___all__:
that caused the expected ImportError due to pty.py trying to import the
non-existent FCNTL to get handled by test___all__, leaving a partial
module object for pty in sys.modules, which caused the later import of
pty via test_pty to succeed.  Then test_tpy died with an AttributeError,
due to trying to access attributes of pty that didn't exist.  regrtest
viewed that as a failure rather than the appropriate "test skipped".
Fixed by deleting partial module objects in test___all__ when test___all__
handles an ImportError.
Lib/test/test___all__.py