Files
audita/tests/test_new_launcher.py

32 lines
641 B
Python

import os
import shutil
import subprocess
from pathlib import Path
import pytest
ROOT = Path(__file__).resolve().parents[1]
LAUNCHER = ROOT / "audita"
def test_root_launcher_exists_and_is_executable():
assert LAUNCHER.is_file()
assert os.access(LAUNCHER, os.X_OK)
def test_root_launcher_help_smoke():
if shutil.which("uv") is None:
pytest.skip("uv is not installed")
result = subprocess.run(
[str(LAUNCHER), "--help"],
cwd=ROOT,
text=True,
capture_output=True,
check=False,
)
assert result.returncode == 0
assert result.stdout.startswith("usage: audita ")