summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_module.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_module.py')
-rw-r--r--Lib/test/test_module.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/Lib/test/test_module.py b/Lib/test/test_module.py
index 5a9b503..536f7cf 100644
--- a/Lib/test/test_module.py
+++ b/Lib/test/test_module.py
@@ -37,8 +37,10 @@ class ModuleTests(unittest.TestCase):
self.assertEqual(foo.__doc__, None)
self.assertIs(foo.__loader__, None)
self.assertIs(foo.__package__, None)
+ self.assertIs(foo.__spec__, None)
self.assertEqual(foo.__dict__, {"__name__": "foo", "__doc__": None,
- "__loader__": None, "__package__": None})
+ "__loader__": None, "__package__": None,
+ "__spec__": None})
def test_ascii_docstring(self):
# ASCII docstring
@@ -47,7 +49,8 @@ class ModuleTests(unittest.TestCase):
self.assertEqual(foo.__doc__, "foodoc")
self.assertEqual(foo.__dict__,
{"__name__": "foo", "__doc__": "foodoc",
- "__loader__": None, "__package__": None})
+ "__loader__": None, "__package__": None,
+ "__spec__": None})
def test_unicode_docstring(self):
# Unicode docstring
@@ -56,7 +59,8 @@ class ModuleTests(unittest.TestCase):
self.assertEqual(foo.__doc__, "foodoc\u1234")
self.assertEqual(foo.__dict__,
{"__name__": "foo", "__doc__": "foodoc\u1234",
- "__loader__": None, "__package__": None})
+ "__loader__": None, "__package__": None,
+ "__spec__": None})
def test_reinit(self):
# Reinitialization should not replace the __dict__
@@ -69,7 +73,7 @@ class ModuleTests(unittest.TestCase):
self.assertEqual(foo.bar, 42)
self.assertEqual(foo.__dict__,
{"__name__": "foo", "__doc__": "foodoc", "bar": 42,
- "__loader__": None, "__package__": None})
+ "__loader__": None, "__package__": None, "__spec__": None})
self.assertTrue(foo.__dict__ is d)
def test_dont_clear_dict(self):