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:
parent
65c23d85a5
commit
1f5343ec31
1 changed files with 2 additions and 0 deletions
|
@ -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")
|
||||
|
|
Loading…
Reference in a new issue