Files
nvi/tests/test_imports.py

45 lines
1.0 KiB
Python

"""Regression: every module imports cleanly.
Catches things like:
- the `api/semantic` → `api/datasets` rename leaving a stale import in schema.py
- the `api/tools/observability` → `api/langfuse_client` move
- the `api/anthropic_client` → `api/llm` move
"""
import importlib
import pytest
MODULES = [
"api.main",
"api.config",
"api.langfuse_client",
"api.llm",
"api.datasets",
"api.prompts",
"api.recon",
"api.recon.types",
"api.recon.build",
"api.tools.db",
"api.tools.text_to_sql",
"api.tools.execute_sql",
"api.tools.types",
"api.analyses.base",
"api.analyses.types",
"api.analyses.direct_answer",
"api.analyses.compare_periods",
"api.analyses.registry",
"api.plan.planner",
"api.plan.types",
"api.runtime.runner",
"api.runtime.events",
"api.runtime.state",
"api.runtime.context",
"ctrl.seed.load_bird",
]
@pytest.mark.parametrize("name", MODULES)
def test_module_imports(name):
importlib.import_module(name)