Test independent Python code blocks from docs. Each block runs in isolation (memory=False). CWD is changed to tmp_path to isolate any file I/O. Note: power-estimation.md contains code snippets that reference variables from the codebase; these are not standalone runnable examples.
(fpath, tmp_path, monkeypatch)
| 25 | ids=lambda p: Path(p).name, |
| 26 | ) |
| 27 | def test_doc_python_blocks(fpath, tmp_path, monkeypatch): |
| 28 | """Test independent Python code blocks from docs. |
| 29 | |
| 30 | Each block runs in isolation (memory=False). |
| 31 | CWD is changed to tmp_path to isolate any file I/O. |
| 32 | |
| 33 | Note: power-estimation.md contains code snippets that reference |
| 34 | variables from the codebase; these are not standalone runnable examples. |
| 35 | """ |
| 36 | monkeypatch.chdir(tmp_path) |
| 37 | abs_fpath = Path(__file__).parent.parent / fpath |
| 38 | check_md_file(str(abs_fpath)) |
| 39 | |
| 40 | |
| 41 | def test_first_tracking_tutorial(tmp_path, monkeypatch): |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…