-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Closed
Labels
DocumentationIssues describing a change to documentation.Issues describing a change to documentation.FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.help wanted
Milestone
Description
The current docs say:
Name returns the name of the running test or benchmark.
For a func TestFoo(t *testing.T), I think it's reasonably clear that Name will be TestFoo.
However, for a sub-test like t.Run("Bar", ...), it's not clear from the documentation if Name will return TestFoo/Bar or just TestFoo.
Another open question is whether the name will be altered, just like it is when printing output. For example, t.Run("bar baz", ...) ends up printing TestFoo/bar_baz in the terminal, so if the subtest name is included in the Name method, I'm not sure which of the two I'd expect.
cc @mpvl as per the owners doc
cc @adg @bradfitz since they added the Name method
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
DocumentationIssues describing a change to documentation.Issues describing a change to documentation.FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.help wanted