• Tim Peters's avatar
    test_pty started failing on Windows, but if and only if test___all__ was · 76c066b1
    Tim Peters yazdı
    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.
    76c066b1
test___all__.py 3.34 KB