Skip to content

Commit

Permalink
Add test ensuring subclass behaviors are retained during traversal.
Browse files Browse the repository at this point in the history
  • Loading branch information
Conchylicultor authored and jaraco committed Oct 15, 2020
1 parent 2ce5576 commit 9e2b456
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test_zipp.py
Expand Up @@ -345,3 +345,10 @@ def test_root_unnamed(self, alpharep):
sub = root / "b"
assert sub.name == "b"
assert sub.parent

@pass_alpharep
def test_inheritance(self, alpharep):
cls = type('PathChild', (zipp.Path,), {})
for alpharep in self.zipfile_alpharep():
file = cls(alpharep).joinpath('some dir').parent
assert isinstance(file, cls)

0 comments on commit 9e2b456

Please sign in to comment.