| … | … | @@ -0,0 +1,26 @@ |
| 1 | """No test may write production state files (labs#13). |
| 2 | |
| 3 | 2026-10-04: the suite run on stortron at deploy appended seven fixture jobs |
| 4 | (`series:tmdb:1:1:1:720`, `tt16026746`, ...) to the REAL ingest_history.jsonl. |
| 5 | Older test files redirect INGEST_QUEUE_FILE but predate the history file, so |
| 6 | their jobs appended beside addon.py. Same shape as the 2026-08-31 queue |
| 7 | clobber: a path a test does not know about is a path it writes to production. |
| 8 | |
| 9 | conftest redirects every such path for every test; this proves it. |
| 10 | |
| 11 | Run: .venv/bin/python3 -m pytest test_suite_isolation.py -q |
| 12 | """ |
| 13 | |
| 14 | import os |
| 15 | |
| 16 | import addon |
| 17 | |
| 18 | HERE = os.path.dirname(os.path.abspath(addon.__file__)) |
| 19 | |
| 20 | |
| 21 | def test_history_is_never_the_production_file(): |
| 22 | assert os.path.dirname(os.path.abspath(addon.INGEST_HISTORY_FILE)) != HERE |
| 23 | |
| 24 | |
| 25 | def test_jellyfin_config_is_never_the_production_file(): |
| 26 | assert os.path.dirname(os.path.abspath(addon.JELLYFIN_CONFIG)) != HERE |