Skip to content

wrong xpass on xfail-marked test function with failing setup #9

Description

@pytestbot

Originally reported by: holger krekel (BitBucket: hpk42, GitHub: hpk42)


Running this with pytest-2.0

#!python

import pytest

def setup_function(func):
    assert 0

@pytest.mark.xfail
def test_hello():
    pass

will result in a wrong XPASS result.


Activity

  1. pytestbot commented on Dec 6, 2010

    @pytestbot
    ContributorAuthor

    Original comment by holger krekel (BitBucket: hpk42, GitHub: hpk42):


    fix issue9 wrong XPass with failing setup/teardown function of xfail marked test

    now when setup or teardown of a test item/function fails and the test
    is marked "xfail" it will show up as an xfail-ed test.

  2. added a commit that references this issue on Oct 27, 2018
    4c480bc
  3. added a commit that references this issue on May 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugproblem that needs to be addressed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions