diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2015-09-19 18:00:46 +0200 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2015-09-19 18:00:46 +0200 |
commit | 50b7a002c7677238e475eb5d85a74b521aac480e (patch) | |
tree | 4ef6906e8990eb02231141091d57f581a1b20623 /setuptools | |
parent | 0c984fb56249c3d58cf1be3015e36afab77c184c (diff) | |
parent | 30a15dcce774cd9ed2a3f09644aea42fb9f1e819 (diff) | |
download | external_python_setuptools-50b7a002c7677238e475eb5d85a74b521aac480e.tar.gz external_python_setuptools-50b7a002c7677238e475eb5d85a74b521aac480e.tar.bz2 external_python_setuptools-50b7a002c7677238e475eb5d85a74b521aac480e.zip |
Merge
Diffstat (limited to 'setuptools')
-rw-r--r-- | setuptools/tests/test_setuptools.py | 23 |
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 == [] |