MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_cwd

Method test_cwd

Lib/test/test_tarfile.py:1694–1709  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1692 self._test_pathname("///foo", "foo")
1693
1694 def test_cwd(self):
1695 # Test adding the current working directory.
1696 with os_helper.change_cwd(TEMPDIR):
1697 tar = tarfile.open(tmpname, self.mode)
1698 try:
1699 tar.add(".")
1700 finally:
1701 tar.close()
1702
1703 tar = tarfile.open(tmpname, "r")
1704 try:
1705 for t in tar:
1706 if t.name != ".":
1707 self.assertStartsWith(t.name, "./")
1708 finally:
1709 tar.close()
1710
1711 def test_open_nonwritable_fileobj(self):
1712 for exctype in OSError, EOFError, RuntimeError:

Callers

nothing calls this directly

Calls 4

openMethod · 0.45
addMethod · 0.45
closeMethod · 0.45
assertStartsWithMethod · 0.45

Tested by

no test coverage detected