diff --git a/pyproject.toml b/pyproject.toml index e489348a..78f96b74 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,4 +41,8 @@ extend-exclude = [ [tool.pytest.ini_options] testpaths = ["tests"] -pythonpath = ["src", "scripts"] +# Repo root (".") must be on the path so tests can `import scripts.`: the +# scripts package (scripts/__init__.py) is imported as a top-level package by +# 26 test modules. Without ".", the console-script `pytest` used in CI cannot +# find it — only `python -m pytest`, which adds the CWD, worked, masking the gap. +pythonpath = ["src", "scripts", "."] diff --git a/src/openamp_foundry/cli/main.py b/src/openamp_foundry/cli/main.py index 1db13a82..aa194839 100644 --- a/src/openamp_foundry/cli/main.py +++ b/src/openamp_foundry/cli/main.py @@ -2286,7 +2286,7 @@ def build_parser() -> argparse.ArgumentParser: ) negative_result_parser.set_defaults(func=_run_negative_result_check) - experiment_priority_parser = subparsers.add_parser( + experiment_priority_parser = sub.add_parser( "experiment-priority-check", help="Validate an experiment priority justification entry", )