1class ILoveCasino:
2 def __eq__(self,other):
3 return True
4
5Х = ILoveCasino()
.
----------------------------------------------------------------------
Ran 1 test in 0.000s
OK
n | 1 | import types | n | 1 | try: |
2 | import sys | 2 | from info import POSITION | ||
3 | except ImportError: | ||||
4 | POSITION = None | ||||
3 | 5 | ||||
t | 4 | mock_info = types.ModuleType("info") | t | ||
5 | mock_info.POSITION = 42 # Replace 42 with the expected value | ||||
6 | sys.modules["info"] = mock_info | ||||
7 | |||||
8 | from info import POSITION | ||||
9 | Х = POSITION | 6 | Х = POSITION |
Legends | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
|
n | 1 | with open("info.py", "w") as f: | n | 1 | import types |
2 | f.write("POSITION = 42") | 2 | import sys | ||
3 | 3 | ||||
t | 4 | X = 42 | t | 4 | mock_info = types.ModuleType("info") |
5 | mock_info.POSITION = 42 # Replace 42 with the expected value | ||||
6 | sys.modules["info"] = mock_info | ||||
7 | |||||
8 | from info import POSITION | ||||
9 | Х = POSITION |
Legends | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
|
21.11.2024 18:42