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

Vestigial pathlib 'flavour' tests make assertions about internal method #103379

Closed
barneygale opened this issue Apr 8, 2023 · 1 comment
Closed
Labels
3.12 bugs and security fixes tests Tests in the Lib/test dir topic-pathlib type-bug An unexpected behavior, bug, or error

Comments

@barneygale
Copy link
Contributor

barneygale commented Apr 8, 2023

Pathlib used to contain internal "flavour classes" with their own test suites. These were removed in a68e585 (#31691) and e5b08dd (#101002) along with most of their tests. Only the tests for the internal _parse_path() method remain now.

These tests make assertions about an internal method that we're liable to change, rename or remove in future. They should instead make assertions about the public PurePath.drive, root and parts attributes. I think.

Linked PRs

@barneygale barneygale added type-bug An unexpected behavior, bug, or error tests Tests in the Lib/test dir 3.12 bugs and security fixes topic-pathlib labels Apr 8, 2023
barneygale added a commit to barneygale/cpython that referenced this issue Apr 8, 2023
These tests now make assertions about the public `PurePath.drive`, `root`
and `parts` attributes, rather than an internal method. They're moved out
of the `_BaseFlavourTest`, `PosixFlavourTest` and `NTFlavourTest` classes,
which are removed.
barneygale added a commit that referenced this issue Apr 9, 2023
…3380)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
@barneygale
Copy link
Contributor Author

Fixed in 0a675f4

warsaw pushed a commit to warsaw/cpython that referenced this issue Apr 11, 2023
aisk pushed a commit to aisk/cpython that referenced this issue Apr 18, 2023
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 tests Tests in the Lib/test dir topic-pathlib type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

1 participant