Skip to content

Is the 'raises' parameter in xfail ignored? #145

@doomofart

Description

@doomofart

Hi!

My test returns xfail, although the exception type is not that I specify in 'raises'.

e. g.

@pytest.mark.xfail(raises=ZeroDivisionError)
    def test_xfail(self):
        with check:
            assert 1 == 2

I am waiting 'failed', but the test returns 'xfailed'. I think I'm doing something wrong. Is there another way?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions