pytest-subtests icon indicating copy to clipboard operation
pytest-subtests copied to clipboard

Reports of nested test

Open Conchylicultor opened this issue 3 years ago • 3 comments

Currently:

def test_abc(subtests):
    with subtests.test("a"):
        with subtests.test("b"):
            assert 1 == 2

Is reported as:

___________test_abc [b] ___________

It would be nice if it was reported as:

___________ test_abc [a/b] ___________

This is especially useful when calling the same function from within multiple sub-tests, when the same <name> can be used in multiple subtests.test(<name>), but in different scopes.

Conchylicultor avatar Jul 05 '21 09:07 Conchylicultor