summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMarcus Smith <qwcode@gmail.com>2013-11-24 15:50:11 -0800
committerMarcus Smith <qwcode@gmail.com>2013-11-24 15:50:11 -0800
commit1f5343ec31e5ca1122053a407c2a5be64bcfdcea (patch)
treed1edbf2d92247ed830752d825a2e02a30eaec4c6 /tests
parent65c23d85a59801b42dbd183a56d247660fe54d86 (diff)
downloadpip-1f5343ec31e5ca1122053a407c2a5be64bcfdcea.tar.gz
skip symlink tests when `not hasattr(os, 'symlink')`
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/test_backwardcompat.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/unit/test_backwardcompat.py b/tests/unit/test_backwardcompat.py
index 1dcaf30ca..2e6b9ec06 100644
--- a/tests/unit/test_backwardcompat.py
+++ b/tests/unit/test_backwardcompat.py
@@ -12,6 +12,7 @@ def test_get_path_uid_without_NOFOLLOW(monkeypatch):
path = os.getcwd()
assert get_path_uid(path) == os.stat(path).st_uid
+@pytest.mark.skipif("not hasattr(os, 'symlink')")
def test_get_path_uid_symlink(tmpdir):
f = tmpdir.mkdir("symlink").join("somefile")
f.write("content")
@@ -21,6 +22,7 @@ def test_get_path_uid_symlink(tmpdir):
get_path_uid(fs)
@pytest.mark.skipif("not hasattr(os, 'O_NOFOLLOW')")
+@pytest.mark.skipif("not hasattr(os, 'symlink')")
def test_get_path_uid_symlink_without_NOFOLLOW(tmpdir, monkeypatch):
monkeypatch.delattr("os.O_NOFOLLOW")
f = tmpdir.mkdir("symlink").join("somefile")