From e7f4ace9120f736fd56e2331267fcbe61c5dff3d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 25 Nov 2022 11:57:22 -0500 Subject: [PATCH] Remove constraint that the result of relative_to is a pathlib object. Instead, assert that its string value resolves to the expected value. --- tests/test_zipp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_zipp.py b/tests/test_zipp.py index 4208a83..1e17870 100644 --- a/tests/test_zipp.py +++ b/tests/test_zipp.py @@ -444,7 +444,7 @@ def test_is_symlink(self, alpharep): def test_relative_to(self, alpharep): root = zipp.Path(alpharep) relative = root.joinpath("b", "c.txt").relative_to(root / "b") - assert relative == pathlib.PurePosixPath("c.txt") + assert str(relative) == "c.txt" relative = root.joinpath("b", "d", "e.txt").relative_to(root / "b") assert str(relative) == "d/e.txt"