mirror of
https://github.com/elder-plinius/OBLITERATUS.git
synced 2026-09-21 08:50:42 +02:00
test(cli): verify layer selection reaches local and remote execution
This commit is contained in:
@@ -123,3 +123,25 @@ def test_every_offered_strategy_is_one_distill_actually_dispatches_on():
|
||||
assert branches | {"knee_cosmic"} == EXPECTED_CHOICES, (
|
||||
f"_distill dispatches on {branches | {'knee_cosmic'}}, CLI offers {EXPECTED_CHOICES}"
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.parametrize("strategy", [None, "all", "middle60"])
|
||||
def test_remote_cli_preserves_override_and_method_default(strategy, monkeypatch):
|
||||
from unittest.mock import Mock
|
||||
|
||||
runner = Mock()
|
||||
runner.run_obliterate.return_value = "result"
|
||||
monkeypatch.setattr(cli, "_make_remote_runner", lambda args: runner)
|
||||
argv = ["obliterate", "org/model", "--remote", "operator@example.invalid",
|
||||
"--method", "optimized"]
|
||||
if strategy is not None:
|
||||
argv += ["--layer-selection", strategy]
|
||||
|
||||
cli.main(argv)
|
||||
|
||||
forwarded = runner.run_obliterate.call_args.kwargs
|
||||
assert forwarded["method"] == "optimized"
|
||||
if strategy is None:
|
||||
assert "layer_selection" not in forwarded
|
||||
else:
|
||||
assert forwarded["layer_selection"] == strategy
|
||||
|
||||
Reference in New Issue
Block a user