This document defines the testing policy and workflows for the START project.
Flow
uv run pytest -q
CI=true
and marked with @network
test_common_*.py
test_domain.py
, test_entity.py
test_config.py
, test_languages_config.py
test_system_*.py
test_1_research_domain.py
, test_2_write_introduction.py
test_3_introduction_visualizations.py
test_4_translate_introductions.py
test_integration.py
test_repos_*.py
# Full suite
uv run pytest -q
# Verbose / coverage
uv run pytest -v
uv run pytest --cov=src --cov-report=html
# Focused runs
uv run pytest -k "domain"
uv run pytest tests/test_domain.py
@pytest.mark.integration
: end-to-end or cross-module behavior@pytest.mark.slow
: long-running@pytest.mark.network
: requires external network/APIsGate network tests behind CI:
import os
import pytest
RUN_NETWORK = os.getenv("CI") == "true"
network = pytest.mark.network
def skip_network_if_disallowed():
if not RUN_NETWORK:
pytest.skip("Network tests disabled outside CI")
@network
def test_network_feature():
skip_network_if_disallowed()
# real network call here
tmp_path
for writable temp dirsdata/Languages/Inputs_and_Outputs/**
as allowed by policydef test_file_processing(tmp_path):
source = tmp_path / "input.json"
source.write_text('{"a": 1}')
result = process_file(source)
assert result["a"] == 1
# Non-GUI matplotlib backend
export MPLBACKEND=Agg
# Optional: keys for CI network tests
export PERPLEXITY_API_KEY="..."
export OPENROUTER_API_KEY="..."
uv run pytest --cov=src --cov-report=html
@pytest.mark.slow