avocado_loader_yaml package

Module contents

Avocado Plugin that loads tests from YAML files

class avocado_loader_yaml.LoaderYAML

Bases: avocado.core.plugin_interfaces.CLI

configure(parser)

Configures the command line parser with options specific to this plugin

description = "YAML test loader options for the 'run' subcommand"
name = 'loader_yaml'
run(args)

Execute any action the plugin intends.

Example of action may include activating a special features upon finding that the requested command line options were set by the user.

Note: this plugin class is not intended for adding new commands, for that please use CLICmd.

class avocado_loader_yaml.YamlTestsuiteLoader(args, extra_params)

Bases: avocado.core.loader.TestLoader

Gets variants from a YAML file and uses test_reference entries to create a test suite.

discover(reference, which_tests=<DiscoverMode.DEFAULT: <object object>>)

Discover (possible) tests from an reference.

Parameters:
  • reference (str) – the reference to be inspected.
  • which_tests (DiscoverMode) – Limit tests to be displayed
Returns:

a list of test matching the reference as params.

static get_decorator_mapping()
get_full_decorator_mapping()

Allows extending the decorator-mapping after the object is initialized

get_full_type_label_mapping()

Allows extending the type-label-mapping after the object is initialized

static get_type_label_mapping()

No type is discovered by default, uses “full_*_mappings” to report the actual types after “discover()” is called.

name = 'yaml_testsuite'