Commit 30a15dcc authored by Jason R. Coombs's avatar Jason R. Coombs

Add another test capturing issue described in http://bugs.python.org/issue12885

parent 9366bb09
import os
import pytest
import setuptools
......@@ -22,3 +24,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 == []
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment