Index | Files | Directories

package gotesttools

import ""

Package gotesttools is a collection of packages to augment `testing` and support common patterns.


Package Files



assertPackage assert provides assertions for comparing expected values to actual values.
assert/cmd/gty-migrate-from-testifyCommand gty-migrate-from-testify migrates packages from testify/assert and testify/require to
assert/cmpPackage cmp provides Comparisons for Assert and Check
assert/optPackage opt provides common go-cmp.Options for use with assert.DeepEqual.
envPackage env provides functions to test code that read environment variables or the current working directory.
fsPackage fs provides tools for creating temporary files, and testing the contents and structure of a directory.
goldenPackage golden provides tools for comparing large mutli-line strings.
icmdPackage icmd executes binaries and provides convenient assertions for testing the results.
internal/cleanupPackage cleanup handles migration to and support for the Go 1.14+ testing.TB.Cleanup() function.
internal/difflibPackage difflib is a partial port of Python difflib module.
pollPackage poll provides tools for testing asynchronous code.
skipPackage skip provides functions for skipping a test and printing the source code of the condition used to skip the test.
xPackage x is a namespace for experimental packages.
x/subtestPackage subtest provides a TestContext to subtests which handles cleanup, and provides a testing.TB, and context.Context.

Updated 2020-01-10. Refresh now. Tools for package owners.