mirror of
https://github.com/saymrwulf/QuantumLearning.git
synced 2026-05-14 20:58:00 +00:00
26 lines
952 B
Python
26 lines
952 B
Python
|
|
import json
|
||
|
|
|
||
|
|
from quantum_learning.validation import load_notebook_execution_plan
|
||
|
|
from quantum_learning.config import project_root
|
||
|
|
|
||
|
|
|
||
|
|
def test_notebook_execution_plan_covers_capstone_and_entrypoints():
|
||
|
|
plan = load_notebook_execution_plan()
|
||
|
|
identifiers = [target.identifier for target in plan.targets]
|
||
|
|
|
||
|
|
assert plan.title == "QuantumLearning Notebook Execution Plan"
|
||
|
|
assert "start-here" in identifiers
|
||
|
|
assert "course-blueprint" in identifiers
|
||
|
|
assert "capstone-studio" in identifiers
|
||
|
|
assert len(plan.targets) >= 10
|
||
|
|
|
||
|
|
|
||
|
|
def test_all_tracked_notebooks_have_cell_ids():
|
||
|
|
root = project_root() / "notebooks"
|
||
|
|
for path in sorted(root.rglob("*.ipynb")):
|
||
|
|
if ".ipynb_checkpoints" in path.parts:
|
||
|
|
continue
|
||
|
|
data = json.loads(path.read_text())
|
||
|
|
for index, cell in enumerate(data.get("cells", [])):
|
||
|
|
assert "id" in cell, f"Missing cell id in {path.relative_to(project_root())} cell {index}"
|