Method
test_as_cwd_exception
testing/_py/test_local.py:649–655
· testing/_py/test_local.py::TestLocalPath.test_as_cwd_exception
(self, path1)
Source from the content-addressed store, hash-verified
| 647 | assert os.getcwd() == str(old) |
| 648 | |
| 649 | def test_as_cwd_exception(self, path1): |
| 650 | old = local() |
| 651 | dir = path1.ensure(class="st">"subdir", dir=1) |
| 652 | with pytest.raises(ValueError): |
| 653 | with dir.as_cwd(): |
| 654 | raise ValueError() |
| 655 | assert old == local() |
| 656 | |
| 657 | def test_initialize_reldir(self, path1): |
| 658 | with path1.as_cwd(): |
Callers
nothing calls this directly
Tested by
no test coverage detected