Skip to content

--run-parallel doesn't work well with old style @pytest.mark.xfail("expr", ...) #16

@colesbury

Description

@colesbury

Like #13, but with @pytest.mark.xfail with a string condition.

I don't have a minimal reliable reproducer, but I encountered this when running the following pybind11 tests with --run-parallel:

https://github.com/pybind/pybind11/blob/master/tests/test_unnamed_namespace_a.py

module 'pybind11_tests.buffers' has no attribute 'PYBIND11_INTERNALS_VERSION'

During handling of the above exception, another exception occurred:
Error evaluating 'xfail' condition
    (m.PYBIND11_INTERNALS_VERSION <= 4 and (m.defined___clang__ or not m.defined___GLIBCXX__)) or (m.PYBIND11_INTERNALS_VERSION >= 5 and not m.defined_WIN32_or__WIN32 and (m.defined___clang__ or m.defined__LIBCPP_VERSION))
AttributeError: module 'pybind11_tests.buffers' has no attribute 'PYBIND11_INTERNALS_VERSION'

...

ERROR tests/test_unnamed_namespace_a.py::test_have_both_class_any_struct - Failed: Error evaluating 'xfail' condition

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions