(pytester: Pytester)
| 302 | |
| 303 | |
| 304 | def test_cwd_snapshot(pytester: Pytester) -> None: |
| 305 | foo = pytester.mkdir("foo") |
| 306 | bar = pytester.mkdir("bar") |
| 307 | os.chdir(foo) |
| 308 | snapshot = CwdSnapshot() |
| 309 | os.chdir(bar) |
| 310 | assert Path().absolute() == bar |
| 311 | snapshot.restore() |
| 312 | assert Path().absolute() == foo |
| 313 | |
| 314 | |
| 315 | class TestSysModulesSnapshot: |
nothing calls this directly
no test coverage detected