biosimulators_test_suite.results package#

Submodules#

biosimulators_test_suite.results.data_model module#

Data model for results of test cases

Author:

Jonathan Karr <karr@mssm.edu>

Date:

2021-01-01

Copyright:

2021, Center for Reproducible Biomedical Modeling

License:

MIT

class biosimulators_test_suite.results.data_model.TestCaseResult(case=None, type=None, duration=None, exception=None, exception_traceback=None, warnings=None, skip_reason=None, log=None)[source]#

Bases: object

A result of executing a test case

case[source]#

test case

Type:

TestCase

type[source]#

type

Type:

obj:`TestCaseResultType

duration[source]#

execution duration in seconds

Type:

float

exception[source]#

exception

Type:

Exception

exception_traceback[source]#

traceback

Type:

str

warnings[source]#

warnings

Type:

list of TestCaseWarning

skip_reason[source]#

Exception which explains reason for skip

Type:

Exception

log[source]#

log of execution

Type:

str

to_dict(max_log_len=None, debug=True)[source]#

Generate a dictionary representation e.g., for export to JSON

Parameters:
  • max_log_len (int, optional) – maximum log length

  • debug (bool, optional) – whether to display traceback information about each error with additional information for debugging

Returns:

dictionary representation

Return type:

dict

class biosimulators_test_suite.results.data_model.TestCaseResultType(value)[source]#

Bases: str, Enum

Type of test case result

failed = 'failed'[source]#
passed = 'passed'[source]#
skipped = 'skipped'[source]#
class biosimulators_test_suite.results.data_model.TestResultsReport(test_suite_version='0.1.88', results=None, gh_issue=None, gh_action_run=None)[source]#

Bases: object

A report of the results of executing the test suite with a simulation tool

test_suite_version[source]#

version of the test suite which was executed

Type:

str

results[source]#

results of the test cases of the test suite

Type:

list of TestCaseResult

gh_issue[source]#

GitHub issue for which the test suite was executed

Type:

int

gh_action_run[source]#

GitHub action run in which the test suite was executed

Type:

int

to_dict(max_log_len=None)[source]#

Generate a dictionary representation e.g., for export to JSON

Parameters:

max_log_len (int, optional) – maximum log length

Returns:

dictionary representation

Return type:

dict

biosimulators_test_suite.results.io module#

Methods for export test results

Author:

Jonathan Karr <karr@mssm.edu>

Date:

2021-01-01

Copyright:

2021, Center for Reproducible Biomedical Modeling

License:

MIT

biosimulators_test_suite.results.io.write_test_results(results, filename, gh_issue=None, gh_action_run=None)[source]#

Write the results of test cases to a JSON file

Parameters:
  • results (list of TestCaseResult) – results of test cases

  • filename (str) – path to save results

  • gh_issue (int, optional) – GitHub issue for which the test suite was executed

  • gh_action_run (int, optional) – GitHub action run in which the test suite was executed