diff --git a/AUTHORS b/AUTHORS index 0387a3154b3..4f5cf6ed8dd 100644 --- a/AUTHORS +++ b/AUTHORS @@ -320,6 +320,7 @@ Mike Hoyle (hoylemd) Mike Lundy Milan Lesnek Miro HronĨok +Mulat Mekonen mrbean-bremen Nathan Goldbaum Nathan Rousseau diff --git a/changelog/13771.contrib.rst b/changelog/13771.contrib.rst new file mode 100644 index 00000000000..fa5cc8afee5 --- /dev/null +++ b/changelog/13771.contrib.rst @@ -0,0 +1 @@ +Skip `test_do_not_collect_symlink_siblings` on Windows environments without symlink support to avoid false negatives. diff --git a/testing/test_collection.py b/testing/test_collection.py index aeed1ee6b61..40568a9bdf4 100644 --- a/testing/test_collection.py +++ b/testing/test_collection.py @@ -1871,7 +1871,8 @@ def test_do_not_collect_symlink_siblings( """ # Use tmp_path because it creates a symlink with the name "current" next to the directory it creates. symlink_path = tmp_path.parent / (tmp_path.name[:-1] + "current") - assert symlink_path.is_symlink() is True + if not symlink_path.is_symlink(): # pragma: no cover + pytest.skip("Symlinks not supported in this environment") # Create test file. tmp_path.joinpath("test_foo.py").write_text("def test(): pass", encoding="UTF-8")