First of all, thanks for providing and maintaining pytest!
Given a minimal setup like this:
# conftest.py
import pytest
@pytest.fixture
def fixture():
raise Exception()
# test_1.py and test_2.py
def test(fixture):
pass
The "ERROR at" section being printed is ambiguous. You can't tell which section is referring to which test case. Both say ERROR at setup of test.
================================ ERRORS =================================
________________________ ERROR at setup of test _________________________
@pytest.fixture
def fixture():
> raise Exception()
E Exception
conftest.py:5: Exception
________________________ ERROR at setup of test _________________________
@pytest.fixture
def fixture():
> raise Exception()
E Exception
conftest.py:5: Exception
Given the short test summary section, sometimes it's possible to "reverse engineer" which section is referring to which test case especially if they were caused by different exception types and/or lines of code causing the issue. It requires scrolling back and forth, tough.
The "FAILURES" section uses the same headings. At least there's 1 line of code within the stack trace revealing the originally affected test case usually, though.
Afaik there is neither a necessity nor a recommendation to make test case function names unique. So I wonder, why it's not printing its full name by default for these sections.
First of all, thanks for providing and maintaining pytest!
Given a minimal setup like this:
The "ERROR at" section being printed is ambiguous. You can't tell which section is referring to which test case. Both say
ERROR at setup of test.Given the short test summary section, sometimes it's possible to "reverse engineer" which section is referring to which test case especially if they were caused by different exception types and/or lines of code causing the issue. It requires scrolling back and forth, tough.
The "FAILURES" section uses the same headings. At least there's 1 line of code within the stack trace revealing the originally affected test case usually, though.
Afaik there is neither a necessity nor a recommendation to make test case function names unique. So I wonder, why it's not printing its full name by default for these sections.