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

GH-89812: Simplify creation of symlinks in pathlib tests. #106061

Merged

Conversation

barneygale
Copy link
Contributor

@barneygale barneygale commented Jun 24, 2023

Remove PathTest.dirlink() function. Symlinks in PathTest.setUp() are created using os.symlink() directly; symlinks in test functions use Path.symlink_to() in order to make the tests applicable to a (near-)future AbstractPath class.

Remove `PathTest.dirlink()` function. Symlinks in `PathTest.setUp()` are
created using `os.symlink()` directly; symlinks in test functions use
`Path.symlink_to()` in order to make the tests applicable to a
(near-)future `AbstractPath` class.
Copy link
Member

@CAM-Gerlach CAM-Gerlach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not an expert on symlink handling, but while it does make the test code slightly less concise, there appears to be a motivated reason to do so, it eliminates a workaround, and is needed for future improvements. I also couldn't spot any obvious issues in the implementation, though again, I defer to Barney and others regarding SME issues.

@barneygale
Copy link
Contributor Author

Thank you for the review CAM!

@barneygale barneygale merged commit e212618 into python:main Jun 30, 2023
20 checks passed
manosriram pushed a commit to manosriram/cpython that referenced this pull request Jul 1, 2023
…onGH-106061)

Remove `PathTest.dirlink()` function. Symlinks in `PathTest.setUp()` are
created using `os.symlink()` directly; symlinks in test functions use
`Path.symlink_to()` in order to make the tests applicable to a
(near-)future `AbstractPath` class.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip news tests Tests in the Lib/test dir topic-pathlib
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants