schrodinger.test.stu.workup module

Runs workups.

Requires as input a testscript.TestScript object referring to a completed job. Uses the outcome status of the TestScript object as well as the workup protocol stored within the TestScript object to perform a workup and get a Pass/Fail (True/False) result for the test.

Actual workup criteria are in outcomes.

@copyright: Schrodinger, Inc. All rights reserved.

schrodinger.test.stu.workup.workup_outcome(test, job_dir, registered_workups=None, job_dj_job=None)[source]

Runs the outcome_workup of a given script.

Parameters
  • test (testscripts.TestScript) – The script to be tested.

  • job_dir (str) – The directory in which the job was executed

  • registered_workups (dict | None) – Maps all valid workup function names to wrapped workups.

  • job_dj_job (job.queue.BaseJob | None) – Job that was run by the test, if any.

Returns

Does the test pass or fail?

Return type

bool

schrodinger.test.stu.workup.check_exit_status(test, job=None)[source]

Check that the exit status of the test matched expected. Either a good exit status or a bad one can be expected, you can’t enforce that an exit status be “incorporated”, for instance.

Parameters
schrodinger.test.stu.workup.discover_workups()[source]

Registers all workups in outcomes and outcomes.custom.*

schrodinger.test.stu.workup.check_workup(test, test_id, registered_workups=None, job_dj_job=None)[source]

Evaluates the workup for a given test object. If the workup function fails, raise a WorkupFailure. Otherwise, return None.

Parameters
Raises
schrodinger.test.stu.workup.print_summary(scripts)[source]

Prints the summary information at end of a execution.

Parameters

scripts (dict) – a dictionary of TestScript objects. Each holds its own results information.

Returns

Did all tests pass?

schrodinger.test.stu.workup.sort_mixed_list(items)[source]

Sort mixed list of ints and strs. Necessary for sorting lists of test ids as these may be either kind of data.

schrodinger.test.stu.workup.get_job_killed_message(test, job)[source]

Return a suitable message for a job killed by STU.

Parameters
Return type

str