MCPcopy Create free account
hub / github.com/pytest-dev/pytest / test_chdir_undo

Function test_chdir_undo

testing/test_monkeypatch.py:280–284  ·  view source on GitHub ↗
(mp: MonkeyPatch, tmp_path: Path)

Source from the content-addressed store, hash-verified

278
279
280def test_chdir_undo(mp: MonkeyPatch, tmp_path: Path) -> None:
281 cwd = os.getcwd()
282 mp.chdir(tmp_path)
283 mp.undo()
284 assert os.getcwd() == cwd
285
286
287def test_chdir_double_undo(mp: MonkeyPatch, tmp_path: Path) -> None:

Callers

nothing calls this directly

Calls 2

undoMethod · 0.80
chdirMethod · 0.45

Tested by

no test coverage detected