From 1f2d639029446e7e9be78b0ef79fedbdccc70ccb Mon Sep 17 00:00:00 2001 From: Paul Moore Date: Thu, 1 Sep 2016 14:10:07 +0100 Subject: [PATCH] Skip a couple of tests that fail on Windows --- tests/unit/test_compat.py | 2 ++ tests/unit/test_req.py | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/tests/unit/test_compat.py b/tests/unit/test_compat.py index d0f55deed..92be06146 100644 --- a/tests/unit/test_compat.py +++ b/tests/unit/test_compat.py @@ -15,6 +15,8 @@ def test_get_path_uid_without_NOFOLLOW(monkeypatch): assert get_path_uid(path) == os.stat(path).st_uid +# Skip unconditionally on Windows, as symlinks need admin privs there +@pytest.mark.skipif("sys.platform == 'win32'") @pytest.mark.skipif("not hasattr(os, 'symlink')") def test_get_path_uid_symlink(tmpdir): f = tmpdir.mkdir("symlink").join("somefile") diff --git a/tests/unit/test_req.py b/tests/unit/test_req.py index 3f11909cb..38521b988 100644 --- a/tests/unit/test_req.py +++ b/tests/unit/test_req.py @@ -149,6 +149,10 @@ class TestRequirementSet(object): wheel_cache=None) assert req_set.require_hashes + # This test doesn't appear to handle URL-encoded Windows paths + # correctly. Needs reviewing by someone who understands the logic. + @pytest.mark.xfail("sys.platform == 'win32'", + reason="Code doesn't handle url-encoded Windows paths") def test_unsupported_hashes(self, data): """VCS and dir links should raise errors when --require-hashes is on.