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

Subtest message not displayed when installed using pip #90

Open
alex-linx opened this issue May 6, 2023 · 1 comment
Open

Subtest message not displayed when installed using pip #90

alex-linx opened this issue May 6, 2023 · 1 comment

Comments

@alex-linx
Copy link

alex-linx commented May 6, 2023

I am running the subtests example from the documentation:

def test_foo(subtests):
    for i in range(5):
        with subtests.test(msg="custom", i=i):
            assert i % 2 == 0

I am running the tests using

pytest tests/test_tmp.py -v

When I install using pip

pip install pytest-subtests

I get the following output

tests/test_tmp.py::test_foo SUBPASS                                          [100%]
tests/test_tmp.py::test_foo SUBFAIL                                          [100%]
tests/test_tmp.py::test_foo SUBPASS                                          [100%]
tests/test_tmp.py::test_foo SUBFAIL                                          [100%]
tests/test_tmp.py::test_foo SUBPASS                                          [100%]
tests/test_tmp.py::test_foo PASSED                                           [100%]

However, if I install it directly from github using

pip install git+https://github.com/pytest-dev/pytest-subtests

I get the expected output

tests/test_tmp.py::test_foo [custom] (i=0) SUBPASS                           [100%]
tests/test_tmp.py::test_foo [custom] (i=1) SUBFAIL                           [100%]
tests/test_tmp.py::test_foo [custom] (i=2) SUBPASS                           [100%]
tests/test_tmp.py::test_foo [custom] (i=3) SUBFAIL                           [100%]
tests/test_tmp.py::test_foo [custom] (i=4) SUBPASS                           [100%]
tests/test_tmp.py::test_foo PASSED                                           [100%]
@rhoban13
Copy link
Contributor

rhoban13 commented May 7, 2023

I suspect this is simply because #88 fixing this landed a few days ago and hasn't yet been published to pypi.

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

2 participants