Skip to content

Conversation

@mrbean-bremen
Copy link
Member

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.

mrbean-bremen and others added 5 commits March 3, 2024 08:40
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.


def test_not_collect_symlink_syblings(
pytester: Pytester, tmp_path: Path, request: pytest.FixtureRequest
Copy link
Member Author

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".

Copy link
Member

Choose a reason for hiding this comment

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

Thanks!

@nicoddemus
Copy link
Member

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 😅).

@mrbean-bremen
Copy link
Member Author

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 :)

Copy link
Member

@nicoddemus nicoddemus left a 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!

@nicoddemus nicoddemus merged commit 8248946 into pytest-dev:main Mar 3, 2024
@mrbean-bremen mrbean-bremen deleted the symlinked-tests branch March 3, 2024 12:41
flying-sheep pushed a commit to flying-sheep/pytest that referenced this pull request Apr 9, 2024
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pytest 8.0.2 may collect tests multiple times under Windows

2 participants