Skip to content
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

Test with the path protocol, not with pathlib.Path #119064

Closed
serhiy-storchaka opened this issue May 15, 2024 · 0 comments
Closed

Test with the path protocol, not with pathlib.Path #119064

serhiy-storchaka opened this issue May 15, 2024 · 0 comments
Labels
3.12 bugs and security fixes 3.13 bugs and security fixes 3.14 new features, bugs and security fixes tests Tests in the Lib/test dir

Comments

@serhiy-storchaka
Copy link
Member

serhiy-storchaka commented May 15, 2024

A number of tests use pathlib.Path to test that the code supports path-like objects. They should use a special object that only implements the path protocol instead. This will avoid unintentional dependency on other pathlib.Path methods and attributes and allow to test path-like objects with the bytes path.

Linked PRs

@serhiy-storchaka serhiy-storchaka added tests Tests in the Lib/test dir 3.12 bugs and security fixes 3.13 bugs and security fixes 3.14 new features, bugs and security fixes labels May 15, 2024
miss-islington pushed a commit to miss-islington/cpython that referenced this issue May 16, 2024
serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this issue May 16, 2024
…h in tests (pythonGH-119065)

(cherry picked from commit 0152dc4)

Co-authored-by: Serhiy Storchaka <[email protected]>
serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this issue May 16, 2024
…h in tests (pythonGH-119065)

(cherry picked from commit 0152dc4)

Co-authored-by: Serhiy Storchaka <[email protected]>
serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this issue May 16, 2024
…h in tests (pythonGH-119065)

(cherry picked from commit 0152dc4)

Co-authored-by: Serhiy Storchaka <[email protected]>
serhiy-storchaka added a commit that referenced this issue May 16, 2024
…ests (GH-119065) (GH-119087)

(cherry picked from commit 0152dc4)

Co-authored-by: Serhiy Storchaka <[email protected]>
serhiy-storchaka added a commit that referenced this issue May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.12 bugs and security fixes 3.13 bugs and security fixes 3.14 new features, bugs and security fixes tests Tests in the Lib/test dir
Projects
None yet
Development

No branches or pull requests

1 participant