anypytools.pytest_plugin

Created on Mon Sep 1 12:44:36 2014.

@author: Morten

exception anypytools.pytest_plugin.AnyException[source]

Custom exception for error reporting.

class anypytools.pytest_plugin.AnyTestFile(*k, **kw)[source]

pytest.File subclass for AnyScript files.

collect()[source]

Yield test cases from a AnyScript test file.

config: Config

The pytest config object.

name: str

A unique name within the scope of the parent node.

parent

The parent collector node.

path: pathlib.Path

Filesystem path where this node was collected from (can be None).

session: Session

The pytest session this node is part of.

class anypytools.pytest_plugin.AnyTestItem(*k, **kw)[source]

pytest.Item subclass representing individual collected tests.

reportinfo()[source]
repr_failure(excinfo)[source]

Print a representation when a test failes.

runtest()[source]

Run an AnyScript test item.

save_output_files(src_folder, target_folder, result, hdf5files)[source]

Saves hdf5, macro, and log files from a test run and copy it to the target_folder

config: Config

The pytest config object.

name: str

A unique name within the scope of the parent node.

parent

The parent collector node.

path: pathlib.Path

Filesystem path where this node was collected from (can be None).

session: Session

The pytest session this node is part of.

class anypytools.pytest_plugin.AnyTestSession[source]

Class for storing configuation of the AnyTest plugin to pytest.

configure(config)[source]

Configure the AnyTestSession object.

This can’t be in __init__() since it is instantiated and added to the pytest namespace very early in the pytest startup.

class anypytools.pytest_plugin.DeferPlugin[source]

Simple plugin to defer pytest-xdist hook functions.

pytest_xdist_setupnodes(config, specs)[source]

called before any remote node is set up.

anypytools.pytest_plugin.change_dir(path)[source]

Context manager for changing directories.

anypytools.pytest_plugin.cwd(path)[source]
anypytools.pytest_plugin.load_duration_supported()[source]
anypytools.pytest_plugin.pytest_addoption(parser)[source]
anypytools.pytest_plugin.pytest_collect_file(parent, path)[source]

Collect AnyScript test files.

anypytools.pytest_plugin.pytest_collection_finish(session)[source]
anypytools.pytest_plugin.pytest_collection_modifyitems(items, config)[source]
anypytools.pytest_plugin.pytest_configure(config)[source]

Configure the AnyTest framework.

anypytools.pytest_plugin.split_string_eq_1(kv)[source]