1
1
Fork 0
mirror of https://github.com/pypa/pip synced 2023-12-13 21:30:23 +01:00

skip symlink tests when not hasattr(os, 'symlink')

This commit is contained in:
Marcus Smith 2013-11-24 15:50:11 -08:00
parent 65c23d85a5
commit 1f5343ec31

View file

@ -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")