npu.tests.test_utils

Classes

TestUtils()

Util methods to assist NAIPS-based software testing systems.

class npu.tests.test_utils.TestUtils

Util methods to assist NAIPS-based software testing systems.

__init__()
static run_suite(test_context, suite, LOGGER, error_count, exception_count, pass_count, suite_title)

Run the given suite of tests and report the results through the logging system.

Parameters:
  • test_context (dict) – A dictionary that must contain the name of each test as a key associated with the corresponding Python class as a value.

  • suite (dict) – The error suite as a dictionary whose keys are the unique names of the tests and whose values are the test themselves.

  • LOGGER – The logging system.

  • error_count (int) – The current number of errors.

  • exception_count (int) – The current number of exceptions.

  • pass_count (int) – The current number of passes.

  • suite_title (str) – The title for the suite.

Type:

logging.Logger or None

Returns:

The error, exception, and pass counts.

Return type:

tuple of int

static load_tests_module(module_str)

Load teh test modules inside the given tests module.

See npu.tests.naips_test.NAIPSTest.

Parameters:

module_str (str) – The tests module whose modules are tests. For example: "src.tests".

Returns:

Dictionary with the loaded modules.

Return type:

dict