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 ¶
func RunBenchmarks ¶
RunBenchmarks runs the benchmarks in the directory passed in
func RunScript ¶
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 ¶
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 ¶
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.