testutils

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 29, 2020 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Package testutils provides generic functions to simplify testing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckGoroutines

func CheckGoroutines(t *testing.T, f func())

CheckGoroutine runs f and checks that there are no zombie goroutines left.

Because, the runtime may create some goroutines, f is run multiple times. A goroutine leak should then also appear multiple times.

func Expect

func Expect(t *testing.T, name string, expected, actual interface{})

Expect generates an error if expected and actual are not deeply equal.

func Watchdog

func Watchdog(t *testing.T, seconds int) *time.Timer

Watchdog starts a timer that generates an error after seconds seconds, unless cancelled by its Stop method.

Types

This section is empty.

Directories

Path Synopsis
Package pytest provides functions to simplify testing in Pythia.
Package pytest provides functions to simplify testing in Pythia.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL