Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add (*td.T).Parallel() method #150

Merged
merged 1 commit into from
Jul 12, 2021
Merged

feat: add (*td.T).Parallel() method #150

merged 1 commit into from
Jul 12, 2021

Conversation

abhinav
Copy link
Contributor

@abhinav abhinav commented Jul 11, 2021

Add a Parallel() method to *td.T that calls Parallel() on the
underlying testing.TB if it supports the method. This will have no
effect on *testing.B or custom wrappers that do not support
Parallel().

Per #149, this implements this as a method rather than a top-level
td.Parallel(t) function because this is closer to what existing usage
of *testing.T looks like.

Resolves #149

@coveralls
Copy link

coveralls commented Jul 11, 2021

Pull Request Test Coverage Report for Build 1024399179

  • 5 of 5 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.0001%) to 99.837%

Totals Coverage Status
Change from base Build 1009347221: 0.0001%
Covered Lines: 8567
Relevant Lines: 8581

💛 - Coveralls

Copy link
Owner

@maxatome maxatome left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please change your commit message to:

feat: add (*td.T).Parallel() method

Only cosmetic changes, thanks! :)

internal/test/types.go Outdated Show resolved Hide resolved
td/t_struct.go Outdated Show resolved Hide resolved
td/t_struct.go Outdated Show resolved Hide resolved
@abhinav abhinav changed the title td.T: Add Parallel() method feat: add (*td.T).Parallel() method Jul 12, 2021
Add a Parallel() method to `*td.T` that calls `Parallel()` on the
underlying `testing.TB` if it supports the method. This will have no
effect on `*testing.B` or custom wrappers that do not support
`Parallel()`.

Per #149, this implements this as a method rather than a top-level
`td.Parallel(t)` function because this is closer to what existing usage
of `*testing.T` looks like.

Resolves #149
@abhinav
Copy link
Contributor Author

abhinav commented Jul 12, 2021

Comments incorporated and commit message updated. Thanks for the review!

@maxatome maxatome merged commit 98ab466 into maxatome:master Jul 12, 2021
@abhinav abhinav deleted the parallel branch July 12, 2021 21:49
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.

Difficult to call t.Parallel with td.T
3 participants