diff options
Diffstat (limited to 'tests/test_cli.py')
| -rw-r--r-- | tests/test_cli.py | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/test_cli.py b/tests/test_cli.py new file mode 100644 index 0000000..09de22c --- /dev/null +++ b/tests/test_cli.py @@ -0,0 +1,25 @@ +from pathlib import Path + +from mic_clipper.cli import main + + +def test_service_install_dry_run_prints_commands_without_creating_unit(tmp_path, capsys): + unit_path = tmp_path / "mic-clipper.service" + + result = main( + [ + "service", + "install", + "--dry-run", + "--unit-path", + str(unit_path), + "--project-root", + str(tmp_path), + "--python", + "/runtime/python", + ] + ) + + assert result == 0 + assert not unit_path.exists() + assert "systemctl --user enable --now mic-clipper.service" in capsys.readouterr().out |
