summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2009-08-15 13:16:38 (GMT)
committerBenjamin Peterson <benjamin@python.org>2009-08-15 13:16:38 (GMT)
commit4c6e8088f52c4a1d33ff529685512fd6ebe0d21a (patch)
tree26fd508689ec6c19187d4ef63534a8990acd3902 /Lib/test
parent75e1f9985aee7b52812140776120e82c103e7e9a (diff)
downloadcpython-4c6e8088f52c4a1d33ff529685512fd6ebe0d21a.zip
cpython-4c6e8088f52c4a1d33ff529685512fd6ebe0d21a.tar.gz
cpython-4c6e8088f52c4a1d33ff529685512fd6ebe0d21a.tar.bz2
#6707 fix a crash with dir() on an uninitialized module
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_module.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/test/test_module.py b/Lib/test/test_module.py
index 5bc33d4..80d440d 100644
--- a/Lib/test/test_module.py
+++ b/Lib/test/test_module.py
@@ -11,6 +11,7 @@ class ModuleTests(unittest.TestCase):
# and __doc__ is None
foo = ModuleType.__new__(ModuleType)
self.assertTrue(foo.__dict__ is None)
+ self.assertRaises(SystemError, dir, foo)
try:
s = foo.__name__
self.fail("__name__ = %s" % repr(s))