MCPcopy Index your code
hub / github.com/python/cpython / test_relative_to

Method test_relative_to

Lib/test/test_zipfile/_path/test_path.py:555–561  ·  view source on GitHub ↗
(self, alpharep)

Source from the content-addressed store, hash-verified

553
554 @pass_alpharep
555 def test_relative_to(self, alpharep):
556 root = zipfile.Path(alpharep)
557 relative = root.joinpath("b", "c.txt").relative_to(root / "b")
558 assert str(relative) == "c.txt"
559
560 relative = root.joinpath("b", "d", "e.txt").relative_to(root / "b")
561 assert str(relative) == "d/e.txt"
562
563 @pass_alpharep
564 def test_inheritance(self, alpharep):

Callers

nothing calls this directly

Calls 3

joinpathMethod · 0.95
strFunction · 0.85
relative_toMethod · 0.45

Tested by

no test coverage detected