Added executable root launcher for audita
This commit is contained in:
31
tests/test_launcher.py
Normal file
31
tests/test_launcher.py
Normal file
@@ -0,0 +1,31 @@
|
||||
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 ")
|
||||
Reference in New Issue
Block a user