diff options
Diffstat (limited to 'Lib/test/test_importlib/test_spec.py')
-rw-r--r-- | Lib/test/test_importlib/test_spec.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_importlib/test_spec.py b/Lib/test/test_importlib/test_spec.py index 8880ffcbd83..2af47f4b993 100644 --- a/Lib/test/test_importlib/test_spec.py +++ b/Lib/test/test_importlib/test_spec.py @@ -116,6 +116,13 @@ class ModuleSpecTests: self.assertIs(spec.cached, None) self.assertFalse(spec.has_location) + def test_has_location_setter(self): + spec = self.machinery.ModuleSpec(self.name, self.loader, + origin='somewhere') + self.assertFalse(spec.has_location) + spec.has_location = True + self.assertTrue(spec.has_location) + def test_equality(self): other = type(sys.implementation)(name=self.name, loader=self.loader, |