mirror of
https://github.com/saymrwulf/QuantumLearning.git
synced 2026-06-08 00:23:14 +00:00
59 lines
1.5 KiB
Python
59 lines
1.5 KiB
Python
from __future__ import annotations
|
|
|
|
import subprocess
|
|
|
|
from quantum_learning.config import project_root
|
|
|
|
|
|
def test_bootstrap_script_help_works():
|
|
result = subprocess.run(
|
|
["bash", "scripts/bootstrap_mac.sh", "--help"],
|
|
cwd=project_root(),
|
|
capture_output=True,
|
|
text=True,
|
|
check=False,
|
|
)
|
|
|
|
assert result.returncode == 0
|
|
assert "Usage:" in result.stdout
|
|
|
|
|
|
def test_validation_script_help_works():
|
|
result = subprocess.run(
|
|
["bash", "scripts/run_validation.sh", "--help"],
|
|
cwd=project_root(),
|
|
capture_output=True,
|
|
text=True,
|
|
check=False,
|
|
)
|
|
|
|
assert result.returncode == 0
|
|
assert "--full" in result.stdout
|
|
|
|
|
|
def test_project_status_script_runs():
|
|
result = subprocess.run(
|
|
["bash", "scripts/project_status.sh"],
|
|
cwd=project_root(),
|
|
capture_output=True,
|
|
text=True,
|
|
check=False,
|
|
)
|
|
|
|
assert result.returncode == 0
|
|
assert "Git:" in result.stdout
|
|
assert "Validation:" in result.stdout
|
|
|
|
|
|
def test_operations_docs_use_tested_command_forms():
|
|
root = project_root()
|
|
expected_commands = [
|
|
"bash ./scripts/bootstrap_mac.sh",
|
|
"bash ./scripts/project_status.sh",
|
|
"bash ./scripts/run_validation.sh --quick",
|
|
]
|
|
|
|
for relative_path in ("README.md", "FIRST_RUN.md", "OPERATIONS.md"):
|
|
text = (root / relative_path).read_text()
|
|
for command in expected_commands:
|
|
assert command in text
|