Add /api/library datasheet import and component GET/PUT with no exam. Reorganize pytest into datasheet, library, schematic, PCB, and AF+AI. Document Rust criteria (none chosen; no rustup) and coding conformity.
52 lines
1.5 KiB
Python
52 lines
1.5 KiB
Python
"""HTTP routers resolve from periscope/src (auth stays leftover)."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from pathlib import Path
|
|
|
|
import backend.routers.admin as admin
|
|
import backend.routers.contact as contact
|
|
import backend.routers.deps as deps
|
|
import backend.routers.feedback as feedback
|
|
import backend.routers.library as library
|
|
import backend.routers.pipeline as pipeline
|
|
import backend.routers.projects as projects
|
|
import backend.routers.reports as reports
|
|
import backend.routers.survey as survey
|
|
|
|
|
|
def _src(mod, name: str) -> None:
|
|
path = Path(mod.__file__).resolve()
|
|
assert path.name == name
|
|
assert "src" in path.parts
|
|
assert "Native Periscope overlay" not in path.read_text(encoding="utf-8")[:400]
|
|
|
|
|
|
def test_inherited_routers_are_src():
|
|
for mod, name in (
|
|
(admin, "admin.py"),
|
|
(contact, "contact.py"),
|
|
(deps, "deps.py"),
|
|
(feedback, "feedback.py"),
|
|
(library, "library.py"),
|
|
(pipeline, "pipeline.py"),
|
|
(projects, "projects.py"),
|
|
(reports, "reports.py"),
|
|
(survey, "survey.py"),
|
|
):
|
|
_src(mod, name)
|
|
|
|
|
|
def test_auth_router_is_not_rewritten_this_slice():
|
|
import backend.routers.auth as auth
|
|
|
|
path = Path(auth.__file__).resolve()
|
|
assert path.name == "auth.py"
|
|
assert "src" in path.parts
|
|
|
|
|
|
def test_reprocess_helper_names():
|
|
assert callable(pipeline._await_terminal)
|
|
assert callable(pipeline._project_active)
|
|
assert callable(projects._bom_file_to_csv_bytes)
|