toil.test.wdl.builtinTest

Module Contents

Classes

WdlStandardLibraryFunctionsTest

A set of test cases for toil's wdl functions.

WdlWorkflowsTest

A set of test cases for toil's conformance with WDL.

WdlLanguageSpecWorkflowsTest

A set of test cases for toil's conformance with the WDL language specification:

WdlStandardLibraryWorkflowsTest

A set of test cases for toil's conformance with the WDL built-in standard library:

class toil.test.wdl.builtinTest.WdlStandardLibraryFunctionsTest(methodName='runTest')[source]

Bases: toil.test.ToilTest

Inheritance diagram of toil.test.wdl.builtinTest.WdlStandardLibraryFunctionsTest

A set of test cases for toil’s wdl functions.

setUp()[source]

Runs anew before each test to create farm fresh temp dirs.

classmethod setUpClass()[source]

Hook method for setting up class fixture before running tests in the class.

tearDown()[source]

Clean up outputs.

testFn_Sub()[source]

Test the wdl built-in functional equivalent of ‘sub()’.

testFn_Ceil()[source]

Test the wdl built-in functional equivalent of ‘ceil()’, which converts a Float value into an Int by rounding up to the next higher integer

testFn_Floor()[source]

Test the wdl built-in functional equivalent of ‘floor()’, which converts a Float value into an Int by rounding down to the next lower integer

testFn_ReadLines()[source]

Test the wdl built-in functional equivalent of ‘read_lines()’.

testFn_ReadTsv()[source]

Test the wdl built-in functional equivalent of ‘read_tsv()’.

testFn_ReadJson()[source]

Test the wdl built-in functional equivalent of ‘read_json()’.

testFn_ReadMap()[source]

Test the wdl built-in functional equivalent of ‘read_map()’.

testFn_ReadInt()[source]

Test the wdl built-in functional equivalent of ‘read_int()’.

testFn_ReadString()[source]

Test the wdl built-in functional equivalent of ‘read_string()’.

testFn_ReadFloat()[source]

Test the wdl built-in functional equivalent of ‘read_float()’.

testFn_ReadBoolean()[source]

Test the wdl built-in functional equivalent of ‘read_boolean()’.

testFn_WriteLines()[source]

Test the wdl built-in functional equivalent of ‘write_lines()’.

testFn_WriteTsv()[source]

Test the wdl built-in functional equivalent of ‘write_tsv()’.

testFn_WriteJson()[source]

Test the wdl built-in functional equivalent of ‘write_json()’.

testFn_WriteMap()[source]

Test the wdl built-in functional equivalent of ‘write_map()’.

testFn_Transpose()[source]

Test the wdl built-in functional equivalent of ‘transpose()’.

testFn_Length()[source]

Test the WDL ‘length()’ built-in.

testFn_Zip()[source]

Test the wdl built-in functional equivalent of ‘zip()’.

testFn_Cross()[source]

Test the wdl built-in functional equivalent of ‘cross()’.

class toil.test.wdl.builtinTest.WdlWorkflowsTest(methodName='runTest')[source]

Bases: toil.test.ToilTest

Inheritance diagram of toil.test.wdl.builtinTest.WdlWorkflowsTest

A set of test cases for toil’s conformance with WDL.

All tests should include a simple wdl and json file for toil to run that checks the output.

classmethod setUpClass()[source]

Hook method for setting up class fixture before running tests in the class.

check_function(function_name, cases, json_file_name=None, expected_result=None, expected_exception=None)[source]

Run the given WDL workflow and check its output. The WDL workflow should store its output inside a ‘output.txt’ file that can be compared to expected_result.

If expected_exception is set, this test passes only when both the workflow fails and that the given expected_exception string is present in standard error.

Parameters
  • function_name (str) –

  • cases (List[str]) –

  • json_file_name (Optional[str]) –

  • expected_result (Optional[str]) –

  • expected_exception (Optional[str]) –

class toil.test.wdl.builtinTest.WdlLanguageSpecWorkflowsTest(methodName='runTest')[source]

Bases: WdlWorkflowsTest

Inheritance diagram of toil.test.wdl.builtinTest.WdlLanguageSpecWorkflowsTest

A set of test cases for toil’s conformance with the WDL language specification:

https://github.com/openwdl/wdl/blob/main/versions/development/SPEC.md#language-specification

classmethod setUpClass()[source]

Hook method for setting up class fixture before running tests in the class.

test_type_pair()[source]
test_v1_declaration()[source]

Basic declaration example modified from the WDL 1.0 spec:

https://github.com/openwdl/wdl/blob/main/versions/1.0/SPEC.md#declarations

class toil.test.wdl.builtinTest.WdlStandardLibraryWorkflowsTest(methodName='runTest')[source]

Bases: WdlWorkflowsTest

Inheritance diagram of toil.test.wdl.builtinTest.WdlStandardLibraryWorkflowsTest

A set of test cases for toil’s conformance with the WDL built-in standard library:

https://github.com/openwdl/wdl/blob/main/versions/development/SPEC.md#standard-library

classmethod setUpClass()[source]

Hook method for setting up class fixture before running tests in the class.

test_sub()[source]
test_size()[source]
test_ceil()[source]
test_floor()[source]
test_round()[source]
test_stdout()[source]
test_read()[source]

Test the set of WDL read functions.

test_write()[source]

Test the set of WDL write functions.

test_range()[source]
test_transpose()[source]
test_length()[source]
test_zip()[source]
test_cross()[source]
test_as_pairs()[source]
test_as_map()[source]
test_keys()[source]
test_collect_by_key()[source]
test_flatten()[source]