-
-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Teach zipp.Path some additional pathlib.Path methods. #85
Conversation
Covers: * Path.match * Path.glob * Path.rglob * Path.relative_to * Path.is_symlink (with trivial implementation given the lack of symlink support currently) along with an implementation of Path.__eq__ for testing/comparison purposes. Part of the implementation here makes use of CPython internals (from the pathlib module) but it seems to handle fixing that requires some refactoring upstream.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall this looks good. I'm a little worried about the introduction of platform-specific concerns and especially about the correctness of relative_to, but most of my other concerns are nitpicks or things to consider for subsequent iteration.
Tests are failing on Windows, I suspect because relative_to is failing to match the descendants. |
The issue is that
|
… test on Windows. Added test for relative paths with subdirectories.
… Instead, assert that its string value resolves to the expected value.
Covers:
along with an implementation of Path.eq for testing/comparison purposes.
Part of the implementation here makes use of CPython internals (from the pathlib module) but it seems to handle fixing that requires some refactoring upstream.