MCPcopy
hub / github.com/pytest-dev/pytest / test_chdir_gone

Method test_chdir_gone

testing/_py/test_local.py:619–630  ·  testing/_py/test_local.py::TestLocalPath.test_chdir_gone
(self, path1)

Source from the content-addressed store, hash-verified

617
618 @skiponwin32
619 def test_chdir_gone(self, path1):
620 p = path1.ensure(class="st">"dir_to_be_removed", dir=1)
621 p.chdir()
622 p.remove()
623 with pytest.raises(error.ENOENT):
624 local()
625 assert path1.chdir() is None
626 assert os.getcwd() == str(path1)
627
628 with pytest.raises(error.ENOENT):
629 with p.as_cwd():
630 raise NotImplementedError
631
632 @skiponwin32
633 def test_chdir_gone_in_as_cwd(self, path1):

Callers

nothing calls this directly

Calls 4

ensureMethod · 0.80
removeMethod · 0.80
as_cwdMethod · 0.80
chdirMethod · 0.45

Tested by

no test coverage detected