-
Notifications
You must be signed in to change notification settings - Fork 198
Show line number of the failing assert in unittests #290
Copy link
Copy link
Open
Labels
P3We're not considering to work on this, but happy to review a PR. (No assignee)We're not considering to work on this, but happy to review a PR. (No assignee)type: feature request
Description
Hi dear Skylib maintainers,
right now we print the assertion error with the location .../external/bazel_skylib/lib/unittest.bzl:351:10:. It would be much more useful if we either printed the entire stack trace, or show the location of the callsite.
An argument could be made that there should be just one assertion per unit test, in that scenario this is not a problem. However there is so much boilerplate involved with adding a unit test that this is not practical to have one assertion per test. And even Bazel's internal BuildViewTestCase tests have multiple assertions per test.
Thank you!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P3We're not considering to work on this, but happy to review a PR. (No assignee)We're not considering to work on this, but happy to review a PR. (No assignee)type: feature request