In Copr, skip tests that fail with OSError: [Errno 95] Operation not supported

We regularly needed to comment out the tests in pyxattr
to make it build in the @python/python3.N+1 copr.

This way, we no longer need to treat this package as a special case.

The failures look like this:

    _________________ test_binary_payload[file via symlink (path)] _________________

    subject = (PurePosixPath('/builddir/build/BUILD/pyxattr-0.7.2/tmpfmkeynlv/xattr-jqzu5alt.test.symlink'), False)

        def test_binary_payload(subject):
            """test binary values"""
            item = subject[0]
            BINVAL = b"abc\0def"
    >       xattr.set(item, USER_ATTR, BINVAL)
    E       OSError: [Errno 95] Operation not supported

    tests/test_xattr.py:432: OSError
    ======================= 146 failed, 141 passed in 1.39s ========================
This commit is contained in:
Miro Hrončok 2023-03-31 14:59:12 +02:00
parent 8e00147bc5
commit 918e8e4b63

View File

@ -43,7 +43,8 @@ export TEST_IGNORE_XATTRS=security.selinux
# the module is just a C extension => need to add the installed destination to # the module is just a C extension => need to add the installed destination to
# PYTHONPATH, otherwise it won't be found # PYTHONPATH, otherwise it won't be found
export PYTHONPATH=%{buildroot}%{python3_sitearch}:$PYTHONPATH export PYTHONPATH=%{buildroot}%{python3_sitearch}:$PYTHONPATH
python3 -m pytest tests # in Copr, skip tests that fail with OSError: [Errno 95] Operation not supported
python3 -m pytest tests %{?copr_projectname:-k 'not (binary_payload or create_on_existing or empty_value or large_value or many_ops or mixed_access or set_get_remove)'}
%files -n python3-%{name} %files -n python3-%{name}
%{python3_sitearch}/xattr.cpython-%{python3_version_nodots}* %{python3_sitearch}/xattr.cpython-%{python3_version_nodots}*