python

package
v0.21.1 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2022 License: BSD-2-Clause Imports: 8 Imported by: 0

Documentation

Overview

Package python facilitates integration testing against Python scripts.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Args

func Args(f ...string) integration.Option

Args sets additional command line args to be passed to the script (ie. after the script name). If you want to pass arguments to the python process (before the script name) use integration.Args.

func ConfigFile

func ConfigFile(cfg Config) integration.Option

ConfigFile is an option that can be used to write a temporary config file. It is used to pass the connection parameters to the Python side of the tests.

func Import

func Import(class, script string) integration.Option

Import causes the given script to be written out to the working directory and the class name in that script to be imported by the main test runner and executed.

func Test

Test starts a Python script and returns a function that runs subtests using t.Run. Multiple calls to the returned function will result in uniquely named subtests. When all subtests have completed, the daemon is stopped.

Types

type Config

type Config struct {
	JID      jid.JID
	Password string
	Port     string
	Imports  [][]string
	Args     []string
}

Config contains options that can be written to the config file.

Jump to

Keyboard shortcuts

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