Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flaky and pytest-check don't fail when used together #162

Open
antoche opened this issue Nov 18, 2019 · 0 comments
Open

Flaky and pytest-check don't fail when used together #162

antoche opened this issue Nov 18, 2019 · 0 comments

Comments

@antoche
Copy link

antoche commented Nov 18, 2019

Hi,

I've also filed this under okken/pytest-check#25, but since the issue arises only when using both plugins together, I'm not sure where the responsibilities lie, so flagging it with both projects to be sure.

This simple case fails as expected:

from pytest_check import check
import pytest

# @pytest.mark.flaky
def test_foo():
    with check:
        assert 11 == 10

But uncomment the @pytest.mark.flaky and the test now "passes".

The "Flaky Test Report" in the console prints test_foo passed 1 out of the required 1 times. Success!, whereas the pytest final line says no tests ran instead of either the red 1 failed (expected) or the green 1 passed (which would be more consistent with the flaky report).

The exit code from pytest is 0 (i.e., tests passing) instead of either 1 (expected) or 5 (which would be more consistent with the no tests ran printout).

This was using python 3.7.3, pytest 4.6.5, pytest-check 0.3.5 and flaky 3.6.1.

Regards,
A.

@antoche antoche changed the title Flaky doesn't fail tests when using pytest-check Flaky and pytest-check don't fail when used together Nov 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant