From 33b5939102e85ffaee0504d9d46edff3023631e3 Mon Sep 17 00:00:00 2001 From: Iustin Pop Date: Sat, 5 Jun 2021 04:53:43 +0200 Subject: [PATCH] Skip user symlink test on MacOSX Apparently MacOS doesn't have the same limitation (feature?) as Linux of preventing regular users from settings xattrs on symlinks, so let's skip this test on it (MacOS). --- tests/test_xattr.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/test_xattr.py b/tests/test_xattr.py index 4f3e663..40183f8 100644 --- a/tests/test_xattr.py +++ b/tests/test_xattr.py @@ -151,6 +151,10 @@ NOT_BEFORE_36 = pytest.mark.xfail(condition="sys.version_info < (3,6)", NOT_PYPY = pytest.mark.xfail(condition="platform.python_implementation() == 'PyPy'", strict=False) +NOT_MACOSX = pytest.mark.xfail(condition="sys.platform.startswith('darwin')", + reason="Test not supported on MacOS", + strict=True) + # Note: user attributes are only allowed on files and directories, so # we have to skip the symlinks here. See xattr(7). ITEMS_P = [ @@ -438,6 +442,7 @@ def test_binary_payload(subject): assert xattr.get_all(item, namespace=NAMESPACE) == [(USER_NN, BINVAL)] xattr.remove(item, USER_ATTR) +@NOT_MACOSX def test_symlinks_user_fail(testdir, use_dangling): _, sname = get_symlink(testdir, dangling=use_dangling) with pytest.raises(IOError): -- 2.39.5