mirror of
https://github.com/python/cpython.git
synced 2025-08-30 13:38:43 +00:00
regrtest: Fix module.__path__
Issue #26538: libregrtest: Fix setup_tests() to keep module.__path__ type (_NamespacePath), don't convert to a list. Add _NamespacePath.__setitem__() method to importlib._bootstrap_external.
This commit is contained in:
parent
6453e9ed0a
commit
82f04e2dfd
3 changed files with 945 additions and 933 deletions
|
@ -971,6 +971,9 @@ class _NamespacePath:
|
|||
def __iter__(self):
|
||||
return iter(self._recalculate())
|
||||
|
||||
def __setitem__(self, index, path):
|
||||
self._path[index] = path
|
||||
|
||||
def __len__(self):
|
||||
return len(self._recalculate())
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue