-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Do not collect symlinked tests under Windows #12050
Conversation
The check for short paths under Windows via os.path.samefile, introduced in pytest-dev#11936, also found similar tests in symlinked tests in the GH Actions CI. This checks additionally that one of the files is not a symlink. Fixes pytest-dev#12039.
for more information, see https://pre-commit.ci
testing/test_collection.py
Outdated
@@ -1789,6 +1789,26 @@ def test_collect_short_file_windows(pytester: Pytester) -> None: | |||
assert result.parseoutcomes() == {"passed": 1} | |||
|
|||
|
|||
def test_not_collect_symlink_syblings( | |||
pytester: Pytester, tmp_path: Path, request: pytest.FixtureRequest |
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.
Thanks @nicoddemus, that's much better! Nitpicking: its "siblings", not "syblings".
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.
Thanks!
Thanks @mrbean-bremen! Tweaked things a bit to add more information (I also added a test similar to yours in a previous commit, because I saw the PR yesterday without a test, and went to work on a test right away this morning, not realizing you had pushed a new test since then 😅). |
Yes, I added the test before making the PR - you have probably seen the branch before that. Anyway, your test is better, and the documentation is clearer :) |
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.
Thanks again @mrbean-bremen!
The check for short paths under Windows via os.path.samefile, introduced in pytest-dev#11936, also found similar tests in symlinked tests in the GH Actions CI. Fixes pytest-dev#12039. Co-authored-by: Bruno Oliveira <bruno@soliv.dev>
The check for short paths under Windows via os.path.samefile, introduced in #11936, also found similar tests in symlinked tests in the GH Actions CI. This checks additionally that one of the files is not a symlink.
Fixes #12039.