Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var RegenTestData = flag.Bool("regen", false, "Regenerate golden files from current testdata.")
Functions ¶
func CompileSrc ¶ added in v0.1.0
func RunBenchmarks ¶ added in v0.1.0
RunBenchmarks runs the benchmarks in the directory passed in
func RunScript ¶ added in v0.2.0
RunScript runs the provided path to a script. RunScript captures the stdout and stderr while executing the script and compares it to a golden file, blocking until completion.
RunScript("./testdata/foo.py")
will compare the output with "./testdata/foo_golden.txt".
func RunTestTasks ¶ added in v0.2.0
RunTestTasks runs each given task in a newly created py.Context concurrently. If a fatal error is encountered, the given testing.T is signaled.
Types ¶
type Task ¶ added in v0.2.0
type Task struct { ID string // unique key identifying this task. If empty, autogenerated from the basename of PyFile PyFile string // If set, this file pathname is executed in a newly created ctx PyTask func(ctx py.Context) error // If set, a new created ctx is created and this blocks until completion GoldFile string // Filename containing the "gold standard" stdout+stderr. If empty, autogenerated from PyFile or ID Err error // Non-nil if a fatal error is encountered with this task // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.