Skip to content

Conversation

@A5rocks
Copy link
Collaborator

@A5rocks A5rocks commented Dec 21, 2025

I've seen new contributors make this mistake, though I can't find a PR as an example.

@A5rocks A5rocks marked this pull request as ready for review December 21, 2025 08:16
@bzoracler
Copy link
Contributor

Would it be helpful to also display the test case name in the AssertionError?

@A5rocks
Copy link
Collaborator Author

A5rocks commented Dec 22, 2025

This makes the test case fail, so pytest already does. I can do that anyways?

@bzoracler
Copy link
Contributor

Oh okay, that makes sense. I would find it helpful to display it in AssertionError if pytest's output of the test case failure is far away from the assertion error; if it's not far away, then you're right, it's unnecessary.

I don't remember what test case failures look like in various pytest verbosity modes and in various IDE test runners, though.

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

Successfully merging this pull request may close these issues.

2 participants