gotest.tools icon indicating copy to clipboard operation
gotest.tools copied to clipboard

A collection of packages to augment the go testing package and support common patterns.

Results 41 gotest.tools issues
Sort by recently updated
recently updated
newest added

This PR adds a new function for property testing of operations that need to include all the fields on a struct. Common examples of functions that could be tested with...

I found `DurationWithThreshold` returns false if both of the values are zero. https://github.com/gotestyourself/gotest.tools/pull/62/files#diff-d952cf5be65334da619358823c8ff4669961b0d9a30e85d542caad125beac4c6R20 I guess if both of them are zero, we should return true to compare all test cases...

Originally we thought there might be more stuff to include in the `skip` package. It has been a few years, and we haven't added anything. This PR deprecates the `skip`...

I've run across a few cases recently where I've wanted to set a deadline on a test running. Generally when doing potentially complicated things that could deadlock, and as mistake...

enhancement

Fixes #195 Required moving all the tests which used `internal/source` to external test packages. When scanning for an `ast.CallExpr` only consider those that use a `ast.SelectorExpr` where the name of...

bug

Basically, I tried implementing a generic `Not` comparison like `assert.Assert(t, Not(cmp.Equal(foo, bar))`. The interface here seems a bit limiting as I do not have access to variables, formatting or anything...

documentation

I originally tried pitching this to go-cmp, and they said no because they quite resonably want all comparison to be stateless. https://github.com/google/go-cmp/issues/241#issue-736205887 The context from that issue is: > After...

The import aliases break the so-called so-called “minimal module support” in GOPATH mode. Removing them does not seem to harm. See Removing them all with a one-liner: find -name '*.go'...

On OSX, the default temp dir includes a symlink, this means that if you generate a temporary file, and then pass its path into a function which follows links, then...

enhancement

For those of us still using GOPATH mode, it's still possible (or at least it should be) to use modern go packages with a `go.mod` seamlessly. For a working example...