mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
bpo-35843: Implement __getitem__ for _NamespacePath (GH-11690)
This commit is contained in:
parent
8a1bab9291
commit
ab9b31f947
4 changed files with 888 additions and 869 deletions
|
@ -332,6 +332,12 @@ class LoaderTests(NamespacePackageTest):
|
|||
self.assertIsNone(foo.__spec__.origin)
|
||||
self.assertIsNone(foo.__file__)
|
||||
|
||||
def test_path_indexable(self):
|
||||
# bpo-35843
|
||||
import foo
|
||||
expected_path = os.path.join(self.root, 'portion1', 'foo')
|
||||
self.assertEqual(foo.__path__[0], expected_path)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue