Skip to content

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

Closed
@barneygale

Description

@barneygale

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.12only security fixestestsTests in the Lib/test dirtopic-pathlibtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions