MCPcopy
hub / github.com/marimo-team/marimo / test_isolation_cells

Function test_isolation_cells

tests/_runtime/test_pytest_runtime.py:101–123  ·  view source on GitHub ↗

Isolation tests run separately to verify fixture scoping errors.

(notebook_env)

Source from the content-addressed store, hash-verified

99
100@pytest.mark.skipif(sys.platform == "win32", reason="Fails on Windows CI")
101def 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
126def test_pytest_result_summary_includes_xfail() -> None:

Callers

nothing calls this directly

Calls 3

run_pytestFunction · 0.90
mapFunction · 0.85
cellsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…