Uh oh!
There was an error while loading. Please reload this page.
GH-103379: Fix up old tests for pathlib.PurePath._parse_path - #103380
Conversation
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.
terryjreedy
left a comment
There was a problem hiding this comment.
I have seen discussions of whether or not to write tests for private functions and am somewhat on the fence. Since you propose to merely change the existing tests, rather than delete them, and the change makes it clearer (to me) what is really being tested, I approve.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
pathlib.PurePath._parse_parts()pathlib.PurePath._parse_path
terryjreedy
left a comment
There was a problem hiding this comment.
The calls with first and last args being flat tuples looks fine. This looks better to me than before.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
AlexWaygood
left a comment
There was a problem hiding this comment.
Looks great to me -- thanks @barneygale!
barneygale
commented
Apr 9, 2023
Thank you both! |
…ythonGH-103380) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
…ythonGH-103380) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
These tests now make assertions about the public
PurePath.drive,rootandpartsattributes, rather than an internal method. They're moved out of the_BaseFlavourTest,PosixFlavourTestandNTFlavourTestclasses, which are removed.