Skip to content

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

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


Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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