Feature implementation from commits 11522a0..0ff4bb4#2
Open
yashuatla wants to merge 15 commits into
Open
Conversation
Enable parallel testing for almost all tests in packages 'assert' and 'require' by calling t.Parallel() as the first line of the test. A few tests are incompatible and will be fixed separately. They are marked with a FIXME. Incompatible tests: TestFileExists, TestNoFileExists, TestDirExists, TestNoDirExists. Before: $ go test -count=10 ./assert ./require ok github.com/stretchr/testify/assert 7.575s ok github.com/stretchr/testify/require 1.501s After: $ go test -count=10 ./assert ./require ok github.com/stretchr/testify/assert 1.703s ok github.com/stretchr/testify/require 1.245s
…enable-parallel-testing assert,require: enable parallel testing on (almost) all top tests
## Summary This test case verifies that the Passed method returns false when all tests in the suite fail ## Changes Added a test case to check the scenario where all tests fail. ## Motivation This test is important to ensure that the Passed method correctly identifies the overall failure state of a test suite when none of the individual tests pass. ## Example usage This test can be used as a part of the test suite to validate the behavior of the Passed method under failure conditions. ## Related issues None
Add an Helper() method to all mocks in tests of package 'assert'.
Add Helper() method to CollectT like testing.T as we intend to add Helper() to the assert.TestingT interface.
…ests Add Helper() method in internal mocks and assert.CollectT
Co-authored-by: Olivier Mengué <dolmen@cpan.org>
Shortcut in assert.JSONEq once we have validated that 'expected' is valid JSON, and 'actual' is the exact same string.
Shortcut in assert.YAMLEq once we have validated that 'expected' is valid YAML, and 'actual' is the exact same string.
Add t.Parallel() to all package-level tests of the 'mock' package. Result: faster tests results. Before: $ go test -count=10 ./mock ok github.com/stretchr/testify/mock 0.631s After: $ go test -count=10 ./mock ok github.com/stretchr/testify/mock 0.426s
…esting mock: enable parallel testing on internal testsuite
Cleanup runtime use of stdlib's testing internals which was required for older Go versions. Note: we are still using testing.RunTests in the suite's test suite for now.
…f-testing-internals suite: cleanup use of 'testing' internals at runtime
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains changes from a range of commits from the original repository.
Commit Range:
11522a0..0ff4bb4Files Changed: 12 (12 programming files)
Programming Ratio: 100.0%
Commits included:
... and 5 more commits