Isolation tests run separately to verify fixture scoping errors.
(notebook_env)
| 99 | |
| 100 | @pytest.mark.skipif(sys.platform == "win32", reason="Fails on Windows CI") |
| 101 | def test_isolation_cells(notebook_env): |
| 102 | """Isolation tests run separately to verify fixture scoping errors.""" |
| 103 | app, lcls, path, run_pytest = notebook_env |
| 104 | |
| 105 | total = 0 |
| 106 | for cell in app._cell_manager.cells(): |
| 107 | if cell and cell.__test__ and (cell.defs & _ISOLATION_DEFS): |
| 108 | response = run_pytest( |
| 109 | defs=cell.defs, lcls=lcls, notebook_path=path |
| 110 | ) |
| 111 | expected = tuple( |
| 112 | map( |
| 113 | sum, zip(*[_DEF_COUNT[d] for d in cell.defs], strict=False) |
| 114 | ) |
| 115 | ) |
| 116 | assert ( |
| 117 | response.passed, |
| 118 | response.skipped, |
| 119 | response.failed, |
| 120 | response.errors, |
| 121 | ) == expected, response.output |
| 122 | total += response.total |
| 123 | assert total == 2 |
| 124 | |
| 125 | |
| 126 | def test_pytest_result_summary_includes_xfail() -> None: |
nothing calls this directly
no test coverage detected
searching dependent graphs…