Skip to content

Commit e7f4ace

Browse files
committed
Remove constraint that the result of relative_to is a pathlib object. Instead, assert that its string value resolves to the expected value.
1 parent 057ed57 commit e7f4ace

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/test_zipp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ def test_is_symlink(self, alpharep):
444444
def test_relative_to(self, alpharep):
445445
root = zipp.Path(alpharep)
446446
relative = root.joinpath("b", "c.txt").relative_to(root / "b")
447-
assert relative == pathlib.PurePosixPath("c.txt")
447+
assert str(relative) == "c.txt"
448448

449449
relative = root.joinpath("b", "d", "e.txt").relative_to(root / "b")
450450
assert str(relative) == "d/e.txt"

0 commit comments

Comments
 (0)