Skip to content

Commit f48ded3

Browse files
Mulat MekonenMulat Mekonen
authored andcommitted
Skip symlink sibling test on Windows without symlink support #13771
1 parent b1e100d commit f48ded3

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,7 @@ Mike Hoyle (hoylemd)
320320
Mike Lundy
321321
Milan Lesnek
322322
Miro Hrončok
323+
Mulat Mekonen
323324
mrbean-bremen
324325
Nathan Goldbaum
325326
Nathan Rousseau

changelog/13771.contrib.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Skip `test_do_not_collect_symlink_siblings` on Windows environments without symlink support to avoid false negatives.

testing/test_collection.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1871,7 +1871,8 @@ def test_do_not_collect_symlink_siblings(
18711871
"""
18721872
# Use tmp_path because it creates a symlink with the name "current" next to the directory it creates.
18731873
symlink_path = tmp_path.parent / (tmp_path.name[:-1] + "current")
1874-
assert symlink_path.is_symlink() is True
1874+
if not symlink_path.is_symlink(): # pragma: no cover
1875+
pytest.skip("Symlinks not supported in this environment")
18751876

18761877
# Create test file.
18771878
tmp_path.joinpath("test_foo.py").write_text("def test(): pass", encoding="UTF-8")

0 commit comments

Comments
 (0)