Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(119455)

Unified Diff: Lib/test/test_importlib/test_spec.py

Issue 18864: Implementation for PEP 451 (importlib.machinery.ModuleSpec)
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Lib/importlib/_bootstrap.py ('k') | Python/importlib.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
--- a/Lib/test/test_importlib/test_spec.py
+++ b/Lib/test/test_importlib/test_spec.py
@@ -123,6 +123,13 @@
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,
« no previous file with comments | « Lib/importlib/_bootstrap.py ('k') | Python/importlib.h » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+