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
Add the `IsNotType` assertion, which is the inverse
of the existing `IsType` assertion. It allows users to assert that an
object is not of a specific type.
Additionally, minor documentation improvements were made.
## Summary
This PR adds a new assertion function, `IsNotType`, to the
`testify/assert` package. It complements the existing `IsType` function
by providing a way to assert that an object is not of a specific type.
## Changes
* Added the `IsNotType` function to the `assert` package.
* Wrote unit tests for `IsNotType` to ensure correctness.
* Updated documentation to include examples and usage for `IsNotType`.
## Motivation
The `testify/assert` package already provides an `IsType` function to
check if an object is of a specific type. However, there was no built-in
way to assert that an object is **not** of a specific type. This PR
addresses that gap by introducing the `IsNotType` function, improving
the library's completeness and usability.
## Example usage
```go
assert.IsNotType(t, &MyStruct{}, actualObject)
```
## Related issues
_N/A_