Skip to content

Any Run(...) call is assumed to be t.Run #9

@rkennedy

Description

@rkennedy

The function I'm testing happens to be named Run. When I call it twice in a test function, parallleltest flags them as missing calls to Parallel even though they're not calling the Run function from the testing module.

type foo int
func (foo) Run() {}
func TestFooRunning(t *testing.T) {
    t.Parallel()
    var x foo
    x.Run()
    x.Run()
}

Both calls to Run are flagged: "Function TestFooRunning has missing the call to method parallel in the test run"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions