Skip to content

Commit f014843

Browse files
committed
fix tests
1 parent f9ac251 commit f014843

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

codeflash/verification/pytest_plugin.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,8 @@ def mock_urandom(n: int) -> bytes:
189189
pass
190190

191191

192-
_apply_deterministic_patches()
192+
# Note: Deterministic patches are applied conditionally, not globally
193+
# They should only be applied when running CodeFlash optimization tests
193194

194195

195196
def pytest_addoption(parser: Parser) -> None:
@@ -255,6 +256,9 @@ def pytest_configure(config: Config) -> None:
255256
config.addinivalue_line("markers", "loops(n): run the given test function `n` times.")
256257
config.pluginmanager.register(PytestLoops(config), PytestLoops.name)
257258

259+
# Apply deterministic patches when the plugin is configured
260+
_apply_deterministic_patches()
261+
258262

259263
class PytestLoops:
260264
name: str = "pytest-loops"

0 commit comments

Comments
 (0)