Skip to content

Commit

Permalink
update test mode env
Browse files Browse the repository at this point in the history
  • Loading branch information
jlowin committed Sep 4, 2024
1 parent 2bc4b55 commit 3131565
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 14 deletions.
13 changes: 0 additions & 13 deletions src/controlflow/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,19 +130,6 @@ def set_log_level(self):
setup_logging(level=self.log_level)
return self

@model_validator(mode="after")
def test_mode(self):
if os.getenv("CONTROLFLOW_TEST_MODE"):
if self.log_level != "DEBUG":
self.log_level = "DEBUG"
if not self.log_all_messages:
self.log_all_messages = True
if not self.tools_verbose:
self.tools_verbose = True
if self.pretty_print_agent_events:
self.pretty_print_agent_events = False
return self

@model_validator(mode="after")
def _apply_prefect_settings(self):
"""
Expand Down
4 changes: 3 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
@pytest.fixture(autouse=True, scope="session")
def temp_controlflow_settings():
with temporary_settings(
enable_print_handler=False,
pretty_print_agent_events=False,
log_all_messages=True,
log_level="DEBUG",
orchestrator_max_turns=10,
orchestrator_max_calls_per_turn=10,
):
Expand Down

0 comments on commit 3131565

Please sign in to comment.