cwltest.utils
Classes
Store configuration values for cwltest. |
|
Encapsulate relevant test result data for a markdown report. |
|
Encapsulate relevant test result data. |
Functions
|
Generate badges with conformance levels. |
|
Retrieve the test index from its name. |
|
Load and validate the given test file against the cwltest schema. |
|
Parse the results and return statistics and an optional report. |
|
Turn the test into a command line. |
|
Determine the test path and the tool path. |
|
Plain test runner. |
|
Return the short name of a given name. |
|
Return an absolute URI. |
Load optional fsaccess plugin. |
Module Contents
- class cwltest.utils.CWLTestConfig(entry, entry_line, basedir=None, test_baseuri=None, test_basedir=None, outdir=None, classname=None, tool=None, args=None, testargs=None, timeout=None, verbose=None, runner_quiet=None)
Store configuration values for cwltest.
- Parameters:
- entry
- class cwltest.utils.CWLTestReport(id, category, entry, tool, job)
Encapsulate relevant test result data for a markdown report.
- id
- category
- entry
- tool
- job
- class cwltest.utils.TestResult(return_code, standard_output, error_output, duration, classname, entry, tool, job, message='')
Encapsulate relevant test result data.
- Parameters:
- return_code
- standard_output
- error_output
- duration
- message = ''
- classname
- entry
- tool
- job
- create_test_case(test)
Create a jUnit XML test case from this test result.
- create_report_entry(test)
Package test result into a CWLTestReport.
- Parameters:
- Return type:
- cwltest.utils.generate_badges(badgedir, ntotal, npassed, nfailures, nunsupported)
Generate badges with conformance levels.
- cwltest.utils.get_test_number_by_key(tests, key, value)
Retrieve the test index from its name.
- cwltest.utils.load_and_validate_tests(path)
Load and validate the given test file against the cwltest schema.
This also processes $import directives.
- cwltest.utils.parse_results(results, tests, suite_name=None, report=None)
Parse the results and return statistics and an optional report.
An additional tag named “all” will be computed, containing all the test results.
Returns the total number of tests, dictionary of test counts (total, passed, failed, unsupported) by tag, and a jUnit XML report.
- Parameters:
results (collections.abc.Iterable[TestResult])
suite_name (str | None)
report (junit_xml.TestSuite | None)
- Return type:
tuple[int, int, int, int, dict[str, int], dict[str, list[CWLTestReport]], dict[str, list[CWLTestReport]], dict[str, list[CWLTestReport]], junit_xml.TestSuite | None]
- cwltest.utils.prepare_test_command(tool, args, testargs, test, cwd, quiet=True)
Turn the test into a command line.
- cwltest.utils.prepare_test_paths(test, cwd)
Determine the test path and the tool path.
- cwltest.utils.run_test_plain(config, test, test_number=None)
Plain test runner.
- Parameters:
config (CWLTestConfig)
test_number (int | None)
- Return type:
- cwltest.utils.shortname(name)
Return the short name of a given name.
It is a workaround of https://github.com/common-workflow-language/schema_salad/issues/511.
- cwltest.utils.load_optional_fsaccess_plugin()
Load optional fsaccess plugin.
Looks for a package with cwltest.fsaccess entry point and if so, use that to get a filesystem access object that will be used for checking test output.
- Return type:
None