29 lines
750 B
Python
29 lines
750 B
Python
from botty_next.cli import main
|
|
|
|
|
|
def test_config_validate_cli_starts(capsys) -> None:
|
|
exit_code = main(["config", "validate", "-c", "botty_next/config/default.yaml"])
|
|
|
|
captured = capsys.readouterr()
|
|
assert exit_code == 0
|
|
assert '"profile_name": "local"' in captured.out
|
|
|
|
|
|
def test_detect_cli_runs_template_detector(capsys) -> None:
|
|
exit_code = main(
|
|
[
|
|
"detect",
|
|
"template",
|
|
"--image",
|
|
"fixtures/screenshots/sample_scene.ppm",
|
|
"--template",
|
|
"fixtures/templates/sample_marker.ppm",
|
|
"--threshold",
|
|
"0.99",
|
|
]
|
|
)
|
|
|
|
captured = capsys.readouterr()
|
|
assert exit_code == 0
|
|
assert '"passed": true' in captured.out
|