-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Open
Labels
topic: reportingrelated to terminal output and user-facing messages and errorsrelated to terminal output and user-facing messages and errorstype: proposalproposal for a new feature, often to gather opinions or design the API around the new featureproposal for a new feature, often to gather opinions or design the API around the new feature
Description
In #13804 I set the __module__
on some exception/enum types since it shows up in tracebacks. We also already set it on warning types.
I wonder if we should have a policy to set it for all types we expose? Or at least fixture types. The impetus is I was playing with subtests (#13738) and the failure looks like:
subtests = <_pytest.subtests.Subtests object at 0x7eff332f6900>
def test_it(subtests: pytest.Subtests) -> None:
for i in range(5):
with subtests.test(i=i):
> assert i % 2 == 0
E assert (1 % 2) == 0
y.py:9: AssertionError
That's our automatically showing repr of local variables. I figure it would be nicer to show pytest.Subtests
here and in similar cases.
Metadata
Metadata
Assignees
Labels
topic: reportingrelated to terminal output and user-facing messages and errorsrelated to terminal output and user-facing messages and errorstype: proposalproposal for a new feature, often to gather opinions or design the API around the new featureproposal for a new feature, often to gather opinions or design the API around the new feature