Skip to content

py.test can't xfail tests parametrized with callable objects #750

Closed
@pytestbot

Description

@pytestbot

Originally reported by: sergey chipiga (BitBucket: schipiga, GitHub: schipiga)


Code example:

import pytest


class A(object): pass

@pytest.mark.parametrize('x', [pytest.mark.xfail(A)])
def test(x):
    assert False

or

import pytest

def b():pass

@pytest.mark.parametrize('x', [pytest.mark.xfail(b)])
def test(x):
    assert False

The result: proba.py::test[x0] FAILED


Metadata

Metadata

Assignees

Labels

topic: parametrizerelated to @pytest.mark.parametrizetype: bugproblem that needs to be addressed

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions