Skip to content

Tests are passing when there is a Fail inside pytest.assume in the teardown #58

@Tiarles

Description

@Tiarles

Tests are passing when there is a Fail inside pytest.assume in the teardown. Also, when not using pytest.assume, only the last test is failing.

test code:

import pytest


@pytest.fixture(scope='module')
def fixt_1():
    yield
    with pytest.assume:
        assert False


@pytest.mark.parametrize('x', (1, 2))
def test_1(fixt_1, x):
    pass


@pytest.fixture(scope='module')
def fixt_2():
    yield
    assert False


@pytest.mark.parametrize('x', (10, 20))
def test_2(fixt_2, x):
    pass

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions