You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Call setUp fails on fake_filesystem_unittest.py::_find_modules when one of the modules has unhashable type. I don't know wether is a bad (Undefined) module or not, but I think this is weird behavior.
self = <pyfakefs.fake_filesystem_unittest.Patcher object at 0x7fdc28337d50>
def _find_modules(self) -> None:
"""Find and cache all modules that import file system modules.
Later, `setUp()` will stub these with the fake file system
modules.
"""
module_names = list(self._fake_module_classes.keys()) + [PATH_MODULE]
for name, module in list(sys.modules.items()):
try:
if (
self.use_cache
and module in self.CACHED_MODULES
or not inspect.ismodule(module)
):
continue
except Exception:
# workaround for some py (part of pytest) versions
# where py.error has no __name__ attribute
# see https://github.com/pytest-dev/py/issues/73
# and any other exception triggered by inspect.ismodule
if self.use_cache:
> self.__class__.CACHED_MODULES.add(module)
E TypeError: unhashable type: 'Undefined'
Describe the bug
Call setUp fails on fake_filesystem_unittest.py::_find_modules when one of the modules has unhashable type. I don't know wether is a bad (Undefined) module or not, but I think this is weird behavior.
List of unhashable modules:
How To Reproduce
Environment
The text was updated successfully, but these errors were encountered: