Skip to content

Tags: czeltser/testify

Tags

v1.8.2

Toggle v1.8.2's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Fix Subset/NotSubset when map is missing keys from the subset (stretc…

…hr#1261)

`MapIndex` returns a zero `reflect.Value` if the map value does not
exist. This now aligns more closely with `InDeltaMapValues` by
checking `reflect/Value.IsValid`.

The use of `recover()` was hiding this error by setting the result of
the test to be "false" despite the test suite passing. This led to
flapping tests where they would succeed if the panic occurred on a
missing key before comparing key values that didn't match!

I've ensured the test suite now asserts on the expected error message
and added another example where the subset has keys not found on the
map under test.

v1.8.1

Toggle v1.8.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Bump github.com/stretchr/objx from 0.4.0 to 0.5.0 (stretchr#1283)

Bumps [github.com/stretchr/objx](https://github.com/stretchr/objx) from 0.4.0 to 0.5.0.
- [Release notes](https://github.com/stretchr/objx/releases)
- [Commits](stretchr/objx@v0.4.0...v0.5.0)

---
updated-dependencies:
- dependency-name: github.com/stretchr/objx
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

v1.8.0

Toggle v1.8.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
impr: `CallerInfo` should print full paths to the terminal (stretchr#…

…1201)

* impr: `CallerInfo` should print full paths to the terminal

I am proposing this simple change, which changes this output
```
--- FAIL: TestABC (0.00s)
    --- FAIL: TestABC/C (0.00s)
        /this/is/a/path/to/file_test.go:258:
            	Error Trace:	file_test.go:258
            	            				file_test.go:748
            	Error:      	Not equal:
...
```
to this:
```
--- FAIL: TestABC (0.00s)
    --- FAIL: TestABC/C (0.00s)
        /this/is/a/path/to/file_test.go:258:
            	Error Trace:	/this/is/a/path/to/file_test.go:258
            	            				/this/is/a/path/to/file_test.go:748
            	Error:      	Not equal:
...
```

With the latter output, it is much more straightforward to find the file
you are looking for, even though in the displayed case, the file is the same.

However, for VSCodium, the case is a little more helpful, since VSCodium's
terminal is smart enough to recognize the output, and make links out of that input.

Signed-off-by: Stavros Ntentos <[email protected]>

* test: fix the tests that depended on the previous behavior

Signed-off-by: Stavros Ntentos <[email protected]>

Co-authored-by: Stavros Ntentos <[email protected]>

v1.7.5

Toggle v1.7.5's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
fixing panic in calls to assertion with nil m.mutex (stretchr#1212)

* fixing panic in calls to assertion with nil m.mutex

This reverts a change that was made in stretchr#1182
The PR makes m.mutex a pointer which now needs to be checked but it's not checked for nil everywhere.

This should also help with these issues:
- stretchr#1208
- stretchr#1210

* Revert throwing out the lock because other concurrent calls can already have it locked

* fix go vet copy lock by using pointer

* fix obj assignment for passing test

v1.7.4

Toggle v1.7.4's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Fix panic in AssertExpectations for mocks without expectations (stret…

…chr#1207)

Co-authored-by: Tony Abboud <[email protected]>

v1.7.3

Toggle v1.7.3's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Bump actions/setup-go from 3.1.0 to 3.2.0 (stretchr#1191)

Bumps [actions/setup-go](https://github.com/actions/setup-go) from 3.1.0 to 3.2.0.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](actions/setup-go@v3.1.0...v3.2.0)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

v1.7.2

Toggle v1.7.2's commit message
Update gopkg.in/yaml.v3

v1.7.1

Toggle v1.7.1's commit message
Fixed didPanic to now detect panic(nil).

Previously, the function would not detect panic(nil) calls.
In didPanic, removed the anonymous function call, instead,
added named return values. Added extra test cases for the
panic(nil) call.

v1.7.0

Toggle v1.7.0's commit message
Only use repeatability if no repeatability left

v1.6.1

Toggle v1.6.1's commit message
Update Go versions in Travis

* Updated the versions of Go we run on to reflect our support protocol