summaryrefslogtreecommitdiffstats
path: root/Lib/test/test___all__.py
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2004-08-02 03:55:18 (GMT)
committerTim Peters <tim.peters@gmail.com>2004-08-02 03:55:18 (GMT)
commitd464838ebcf68659617a62abf5e0d04a5425ddfc (patch)
tree50c3c96f8c6a1b90500e371f1e40d382186e59ca /Lib/test/test___all__.py
parent1cd701732fe324adace84a955d48a3dc7753ee59 (diff)
downloadcpython-d464838ebcf68659617a62abf5e0d04a5425ddfc.zip
cpython-d464838ebcf68659617a62abf5e0d04a5425ddfc.tar.gz
cpython-d464838ebcf68659617a62abf5e0d04a5425ddfc.tar.bz2
Removed no-longer-needed convolutions to recover from damaged modules
getting left beyind in sys.modules.
Diffstat (limited to 'Lib/test/test___all__.py')
-rw-r--r--Lib/test/test___all__.py14
1 files changed, 0 insertions, 14 deletions
diff --git a/Lib/test/test___all__.py b/Lib/test/test___all__.py
index ea23846..0794bd8 100644
--- a/Lib/test/test___all__.py
+++ b/Lib/test/test___all__.py
@@ -21,20 +21,6 @@ class AllTest(unittest.TestCase):
except ImportError:
# Silent fail here seems the best route since some modules
# may not be available in all environments.
- # Since an ImportError may leave a partial module object in
- # sys.modules, get rid of that first. Here's what happens if
- # you don't: importing pty fails on Windows because pty tries to
- # import FCNTL, which doesn't exist. That raises an ImportError,
- # caught here. It also leaves a partial pty module in sys.modules.
- # So when test_pty is called later, the import of pty succeeds,
- # but shouldn't. As a result, test_pty crashes with an
- # AttributeError instead of an ImportError, and regrtest interprets
- # the latter as a test failure (ImportError is treated as "test
- # skipped" -- which is what test_pty should say on Windows).
- try:
- del sys.modules[modname]
- except KeyError:
- pass
return
verify(hasattr(sys.modules[modname], "__all__"),
"%s has no __all__ attribute" % modname)