Replies: 1 comment 6 replies
-
Subtests and deferred assertions are utilities to archive this It's not a common flow as within a unittests the common structure is that a failed assertion means the test cannot continue |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Normally (at least in my experience) each unit test throws an exception at the first occurrence of a violation. But there are situations where it makes sense to generate a list of violations and put the entire list in the test report.
Is that something that is sometimes done? Are there any design patterns, best practices, plugins, guides on this?
The best I have managed this far is compiling a message string containing violations, and then in the end raising an exception containing this message. See a dummy example here: https://gist.github.com/velle/a5735750f7a5383cf650e93f4dd68207.
Beta Was this translation helpful? Give feedback.
All reactions