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

Method test_as_cwd

testing/_py/test_local.py:641–647  ·  testing/_py/test_local.py::TestLocalPath.test_as_cwd
(self, path1)

Source from the content-addressed store, hash-verified

639 assert old is None
640
641 def test_as_cwd(self, path1):
642 dir = path1.ensure(class="st">"subdir", dir=1)
643 old = local()
644 with dir.as_cwd() as x:
645 assert x == old
646 assert local() == dir
647 assert os.getcwd() == str(old)
648
649 def test_as_cwd_exception(self, path1):
650 old = local()

Callers

nothing calls this directly

Calls 2

ensureMethod · 0.80
as_cwdMethod · 0.80

Tested by

no test coverage detected