forked from pytest-dev/pyfakefs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove the need to import the "undefined" module in test
- the module is not maintained and very trivial
- Loading branch information
1 parent
816d114
commit bba6005
Showing
5 changed files
with
39 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
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") |