-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
tests: re-harden test_cmdline_python_package_symlink #6733
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
Conversation
This was done on purpose in 7268462, and then reverted in a non-merge "Merge" commit (wrong conflict resolution?): pytest-dev@9646a1cd7#diff-1f1fc4eef6bf4c4da558e0dce9e74e9bR761-R762
Probably, thanks! |
The Windows behavior in py38 confused me - is it creating only a non-dir symlink there or something? |
So my guess is that this somehow regressed before, but is/was hidden by un-hardening it in two different places (and the initial mixup of checking py.path's attribute, additionally to skipping it etc). |
I'm assigning it to myself, thanks again. |
Taken out of pytest-dev#6733, returning for existing symlink (should not skip).
@@ -136,6 +137,24 @@ def testdir(testdir: Testdir) -> Testdir: | |||
return testdir | |||
|
|||
|
|||
@pytest.fixture | |||
def symlink_or_skip(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Slightly improved version used in #6733.
Gave this another go, but no luck so far. It seems that on Linux nodeids are constructed by resolving symlinks, hence we get this output:
That output means pytest/src/_pytest/terminal.py Lines 772 to 775 in f77d606
On Windows,
I have to find where |
@nicoddemus |
Oh sorry I missed that: Administrators and users with special permissions can create symlinks, normal users cannot. I suspect the user running in CI has admin privileges, that's why it works there.
It does the right thing to check for symlinks (just call But yeah I need to set aside more time to investigate further and figure out what's going on. |
Taken out of pytest-dev#6733, returning for existing symlink (should not skip).
Taken out of pytest-dev#6733, returning for existing symlink (should not skip).
This was done on purpose in 7268462, and then reverted in a non-merge
"Merge" commit (wrong conflict resolution?):
9646a1cd7#diff-1f1fc4eef6bf4c4da558e0dce9e74e9bR761-R762