Fix the KeyError in multi_worker_test_base.py caused by __iter__ returning (key, value) which gets interpreted as the key (and hence no value is found).
PiperOrigin-RevId: 236163036
This commit is contained in:
parent
b9f81dfea1
commit
5139b72eff
@ -347,9 +347,9 @@ class MockOsEnv(collections.Mapping):
|
|||||||
def __iter__(self):
|
def __iter__(self):
|
||||||
if not hasattr(self._thread_local, 'dict'):
|
if not hasattr(self._thread_local, 'dict'):
|
||||||
self._thread_local.dict = dict()
|
self._thread_local.dict = dict()
|
||||||
for x in self._thread_local.dict.items():
|
for x in self._thread_local.dict:
|
||||||
yield x
|
yield x
|
||||||
for x in self._dict.items():
|
for x in self._dict:
|
||||||
yield x
|
yield x
|
||||||
|
|
||||||
def __len__(self):
|
def __len__(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user