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')

Bases: toil.test.ToilTest

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

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

setUp()

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

classmethod setUpClass()

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

tearDown()

Clean up outputs.

testFn_Sub()

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

testFn_Ceil()

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()

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()

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

testFn_ReadTsv()

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

testFn_ReadJson()

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

testFn_ReadMap()

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

testFn_ReadInt()

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

testFn_ReadString()

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

testFn_ReadFloat()

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

testFn_ReadBoolean()

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

testFn_WriteLines()

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

testFn_WriteTsv()

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

testFn_WriteJson()

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

testFn_WriteMap()

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

testFn_Transpose()

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

testFn_Length()

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

testFn_Zip()

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

testFn_Cross()

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

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

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()

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)

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')

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()

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

test_type_pair()
test_v1_declaration()

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')

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()

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

test_sub()
test_size()
test_ceil()
test_floor()
test_round()
test_stdout()
test_read()

Test the set of WDL read functions.

test_write()

Test the set of WDL write functions.

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