mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
Issue #18864: Add a setter for ModuleSpec.has_location.
This commit is contained in:
parent
85cce1eac7
commit
b282b3d804
5 changed files with 2942 additions and 2920 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue