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

Method test_relative_to

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

Source from the content-addressed store, hash-verified

554
555 @pass_alpharep
556 def test_relative_to(self, alpharep):
557 root = zipfile.Path(alpharep)
558 relative = root.joinpath("b", "c.txt").relative_to(root / "b")
559 assert str(relative) == "c.txt"
560
561 relative = root.joinpath("b", "d", "e.txt").relative_to(root / "b")
562 assert str(relative) == "d/e.txt"
563
564 @pass_alpharep
565 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