summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--setuptools/tests/test_setuptools.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/setuptools/tests/test_setuptools.py b/setuptools/tests/test_setuptools.py
index e1a06c96..8aca593a 100644
--- a/setuptools/tests/test_setuptools.py
+++ b/setuptools/tests/test_setuptools.py
@@ -1,3 +1,5 @@
+import os
+
import pytest
import setuptools
@@ -23,3 +25,24 @@ def test_findall_curdir(example_source):
found = list(setuptools.findall())
expected = ['readme.txt', 'foo/bar.py']
assert found == expected
+
+
+@pytest.fixture
+def can_symlink(tmpdir):
+ """
+ Skip if cannot create a symbolic link
+ """
+ link_fn = 'link'
+ target_fn = 'target'
+ try:
+ os.symlink(target_fn, link_fn)
+ except (OSError, NotImplementedError, AttributeError):
+ pytest.skip("Cannot create symbolic links")
+ os.remove(link_fn)
+
+
+def test_findall_missing_symlink(tmpdir, can_symlink):
+ with tmpdir.as_cwd():
+ os.symlink('foo', 'bar')
+ found = list(setuptools.findall())
+ assert found == []