Commit abe874d
CI fix: skip plot-source test on isolated-install CI
`test_event_study_plot_uses_stored_pointwise_ci_endpoints` imported
`nbformat` and read the notebook from the repo's `docs/tutorials/`
directory. CI Python Tests run from `/tmp/tests/` (isolated install
of the wheel, no repo-tree access) and don't include nbformat in
the runtime deps, so the test errored:
ModuleNotFoundError: No module named 'nbformat'
tests/test_t22_had_survey_design_drift.py:409
Two guards added (per `feedback_golden_file_pytest_skip` — same
pattern that benchmarks/data/*.json drift tests use):
1. `nbformat = pytest.importorskip("nbformat")` — skips when
the optional dep is missing.
2. `if not nb_path.exists(): pytest.skip(...)` — skips on the
isolated-install matrix where docs/ isn't copied alongside
tests/.
The test runs in any environment that has both nbformat and the
repo tree (dev workspace + tutorial-exec CI workflows), which is
where it actually adds value. The Python Tests matrix doesn't
need to lock notebook source against the prose/code mismatch the
test was added to prevent.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent f7a716a commit abe874d
1 file changed
Lines changed: 7 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
404 | 404 | | |
405 | 405 | | |
406 | 406 | | |
407 | | - | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
408 | 411 | | |
409 | | - | |
| 412 | + | |
410 | 413 | | |
411 | 414 | | |
412 | 415 | | |
413 | 416 | | |
| 417 | + | |
| 418 | + | |
414 | 419 | | |
415 | 420 | | |
416 | 421 | | |
| |||
0 commit comments