Skip to content

UnitTestRunnerUtil

implementation of the unit test runner utilities

UnitTestRunnerUtil

Canonical path: TestHelper.UnitTestRunnerUtil.UnitTestRunnerUtil

implementation of the unit test runner utilities

init_sys_path staticmethod

init_sys_path(test_project_path: str) -> object > None

initialize the sys path

Parameters:

  • test_project_path (str) –

    path of the test project

Returns:

  • object > None

    code coverage object

init_unit_test staticmethod

init_unit_test(load_resources: bool) -> object

initialize the unit test

Parameters:

  • load_resources (bool) –

    load the resources

Returns:

  • object

    Allplan document

run_unit_tests staticmethod

run_unit_tests(
    tests: List[TestSuite],
    code_coverage: object,
    doc: object,
    single_test: object = None,
) -> TestResult

run the unit tests

Parameters:

  • tests (List[TestSuite]) –

    description

  • code_coverage (object) –

    description

  • doc (object) –

    document of the Allplan drawing files

  • single_test (object, default: None ) –

    description

Returns:

  • TestResult

    test result

unload_modules staticmethod

unload_modules(test_project_path: str)

remove the test project path

Parameters:

  • test_project_path (str) –

    path of the test project