✏️ 正在编辑: unhashable.py
路径:
/opt/cloudlinux/venv/lib/python3.11/site-packages/pyfakefs/pytest_tests/unhashable.py
提示:
您可以编辑任何文件(包括二进制文件),但请注意不当修改可能导致文件损坏。
import sys import types class Unhashable(types.ModuleType): """ Unhashable module, used for regression test for #923. """ @property def Unhashable(self): return self def __eq__(self, other): raise NotImplementedError("Cannot compare unhashable") if sys.modules[__name__] is not Unhashable: sys.modules[__name__] = Unhashable("unhashable")
💾 保存文件
← 返回文件管理器