avocado_golang package

Submodules

avocado_golang.runner module

class avocado_golang.runner.GolangRunner(runnable)

Bases: avocado.core.nrunner.BaseRunner

Runner for Golang tests.

When creating the Runnable, use the following attributes:

  • kind: should be ‘golang’;
  • uri: module name and optionally a test method name, separated by colon;
  • args: not used
  • kwargs: not used

Example:

runnable = Runnable(kind=’golang’,
uri=’countavocados:ExampleContainers’)
run()

Runner main method

Yields dictionary as output, containing status as well as relevant information concerning the results.

class avocado_golang.runner.RunnerApp(echo=<built-in function print>, prog=None, description=None)

Bases: avocado.core.nrunner.BaseRunnerApp

PROG_DESCRIPTION = 'nrunner application for golang tests'
PROG_NAME = 'avocado-runner-golang'
RUNNABLE_KINDS_CAPABLE = {'golang': <class 'avocado_golang.runner.GolangRunner'>}
avocado_golang.runner.main()

Module contents

Plugin to run Golang tests in Avocado

class avocado_golang.GolangResolver(config=None)

Bases: avocado.core.plugin_interfaces.Resolver

description = 'Test resolver for Go language tests'
name = 'golang'
static resolve(reference)

Resolves the given reference into a reference resolution.

Parameters:reference (str) – a specification that can eventually be resolved into a test (in the form of a avocado.core.nrunner.Runnable)
Returns:the result of the resolution process, containing the success, failure or error, along with zero or more avocado.core.nrunner.Runnable objects
Return type:avocado.core.resolver.ReferenceResolution
avocado_golang.find_files(path, recursive=True)
avocado_golang.find_tests(test_path)