Skip to content

Commit df96a09

Browse files
committed
tests: ruff format test_model_flags.py
1 parent 458a7b1 commit df96a09

1 file changed

Lines changed: 28 additions & 8 deletions

File tree

‎tests/test_model_flags.py‎

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,21 @@ class Stop(Exception):
1616
def captured(tmp_path, monkeypatch):
1717
seen = {}
1818
cfg = SimpleNamespace(
19-
main_model="saved-main", cluster_model="saved-cluster", fallback_model="saved-fallback",
20-
base_url="http://x", provider="openai-compatible", aws_region="us-east-1",
21-
agent_instructions=None, max_tokens=1, max_token_per_module=1, max_token_per_leaf_module=1,
22-
max_depth=1, request_limit=1, agent_retries=1, use_gitignore=True, prompt_caching=False,
19+
main_model="saved-main",
20+
cluster_model="saved-cluster",
21+
fallback_model="saved-fallback",
22+
base_url="http://x",
23+
provider="openai-compatible",
24+
aws_region="us-east-1",
25+
agent_instructions=None,
26+
max_tokens=1,
27+
max_token_per_module=1,
28+
max_token_per_leaf_module=1,
29+
max_depth=1,
30+
request_limit=1,
31+
agent_retries=1,
32+
use_gitignore=True,
33+
prompt_caching=False,
2334
)
2435

2536
class FakeManager:
@@ -49,10 +60,19 @@ def fake_generator(**kwargs):
4960
def test_saved_models_by_default(captured):
5061
CliRunner().invoke(gen.generate_command, ["-o", "out"])
5162
assert (captured["main_model"], captured["cluster_model"], captured["fallback_model"]) == (
52-
"saved-main", "saved-cluster", "saved-fallback")
63+
"saved-main",
64+
"saved-cluster",
65+
"saved-fallback",
66+
)
5367

5468

5569
def test_flags_override_saved_models(captured):
56-
CliRunner().invoke(gen.generate_command, ["-o", "out", "--main-model", "m", "--cluster-model", "c",
57-
"--fallback-model", "f"])
58-
assert (captured["main_model"], captured["cluster_model"], captured["fallback_model"]) == ("m", "c", "f")
70+
CliRunner().invoke(
71+
gen.generate_command,
72+
["-o", "out", "--main-model", "m", "--cluster-model", "c", "--fallback-model", "f"],
73+
)
74+
assert (captured["main_model"], captured["cluster_model"], captured["fallback_model"]) == (
75+
"m",
76+
"c",
77+
"f",
78+
)

0 commit comments

Comments
 (0)