cwl_utils.tests.test_parser_utils
=================================

.. py:module:: cwl_utils.tests.test_parser_utils

.. autoapi-nested-parse::

   Test the CWL parsers utility functions.



Functions
---------

.. autoapisummary::

   cwl_utils.tests.test_parser_utils.test_static_checker_fail
   cwl_utils.tests.test_parser_utils.test_static_checker_warning
   cwl_utils.tests.test_parser_utils.test_static_checker_success
   cwl_utils.tests.test_parser_utils.test_v1_0_file_content_64_kB
   cwl_utils.tests.test_parser_utils.test_v1_0_file_content_larger_than_64_kB
   cwl_utils.tests.test_parser_utils.test_v_1_0_load_inputfile_with_format
   cwl_utils.tests.test_parser_utils.test_v_1_0_load_inputfile_with_nested_array
   cwl_utils.tests.test_parser_utils.test_v_1_0_load_inputfile_with_secondary_files
   cwl_utils.tests.test_parser_utils.test_v1_0_stdout_to_file
   cwl_utils.tests.test_parser_utils.test_v1_0_stdout_to_file_with_binding
   cwl_utils.tests.test_parser_utils.test_v1_0_stdout_to_file_preserve_original
   cwl_utils.tests.test_parser_utils.test_v1_0_stderr_to_file
   cwl_utils.tests.test_parser_utils.test_v1_0_stderr_to_file_with_binding
   cwl_utils.tests.test_parser_utils.test_v1_0_stderr_to_file_preserve_original
   cwl_utils.tests.test_parser_utils.test_v1_0_type_compare_list
   cwl_utils.tests.test_parser_utils.test_v1_0_type_compare_record
   cwl_utils.tests.test_parser_utils.test_v1_0_type_for_source
   cwl_utils.tests.test_parser_utils.test_v1_0_type_for_source_with_id
   cwl_utils.tests.test_parser_utils.test_v1_0_type_for_stdout
   cwl_utils.tests.test_parser_utils.test_v1_0_type_output_source_record
   cwl_utils.tests.test_parser_utils.test_v1_0_type_for_output_source_with_single_scatter_step
   cwl_utils.tests.test_parser_utils.test_v1_0_type_for_output_source_with_nested_crossproduct_scatter_step
   cwl_utils.tests.test_parser_utils.test_v1_0_type_for_output_source_with_flat_crossproduct_scatter_step
   cwl_utils.tests.test_parser_utils.test_v1_0_type_for_source_with_multiple_entries_merge_nested
   cwl_utils.tests.test_parser_utils.test_v1_0_type_for_source_with_multiple_entries_merge_flattened
   cwl_utils.tests.test_parser_utils.test_v1_0_type_for_source_with_single_entry_merge_nested
   cwl_utils.tests.test_parser_utils.test_v1_0_type_for_source_with_single_entry_merge_flattened
   cwl_utils.tests.test_parser_utils.test_v1_1_file_content_64_kB
   cwl_utils.tests.test_parser_utils.test_v1_1_file_content_larger_than_64_kB
   cwl_utils.tests.test_parser_utils.test_v_1_1_load_inputfile_with_format
   cwl_utils.tests.test_parser_utils.test_v_1_1_load_inputfile_with_nested_array
   cwl_utils.tests.test_parser_utils.test_v_1_1_load_inputfile_with_requirements
   cwl_utils.tests.test_parser_utils.test_v_1_1_load_inputfile_with_secondary_files
   cwl_utils.tests.test_parser_utils.test_v1_1_stdout_to_file
   cwl_utils.tests.test_parser_utils.test_v1_1_stdout_to_file_with_binding
   cwl_utils.tests.test_parser_utils.test_v1_1_stdout_to_file_preserve_original
   cwl_utils.tests.test_parser_utils.test_v1_1_stderr_to_file
   cwl_utils.tests.test_parser_utils.test_v1_1_stderr_to_file_with_binding
   cwl_utils.tests.test_parser_utils.test_v1_1_stderr_to_file_preserve_original
   cwl_utils.tests.test_parser_utils.test_v1_1_stdin_to_file
   cwl_utils.tests.test_parser_utils.test_v1_1_stdin_to_file_with_binding
   cwl_utils.tests.test_parser_utils.test_v1_1_stdin_to_file_fail_with_original
   cwl_utils.tests.test_parser_utils.test_v1_1_type_compare_list
   cwl_utils.tests.test_parser_utils.test_v1_1_type_compare_record
   cwl_utils.tests.test_parser_utils.test_v1_1_type_for_source
   cwl_utils.tests.test_parser_utils.test_v1_1_type_for_source_with_id
   cwl_utils.tests.test_parser_utils.test_v1_1_type_for_stdout
   cwl_utils.tests.test_parser_utils.test_v1_1_type_output_source_record
   cwl_utils.tests.test_parser_utils.test_v1_1_type_for_output_source_with_single_scatter_step
   cwl_utils.tests.test_parser_utils.test_v1_1_type_for_output_source_with_nested_crossproduct_scatter_step
   cwl_utils.tests.test_parser_utils.test_v1_1_type_for_output_source_with_flat_crossproduct_scatter_step
   cwl_utils.tests.test_parser_utils.test_v1_1_type_for_source_with_multiple_entries_merge_nested
   cwl_utils.tests.test_parser_utils.test_v1_1_type_for_source_with_multiple_entries_merge_flattened
   cwl_utils.tests.test_parser_utils.test_v1_1_type_for_source_with_single_entry_merge_nested
   cwl_utils.tests.test_parser_utils.test_v1_1_type_for_source_with_single_entry_merge_flattened
   cwl_utils.tests.test_parser_utils.test_v1_2_file_content_64_kB
   cwl_utils.tests.test_parser_utils.test_v1_2_file_content_larger_than_64_kB
   cwl_utils.tests.test_parser_utils.test_v_1_2_load_inputfile_with_format
   cwl_utils.tests.test_parser_utils.test_v_1_2_load_inputfile_with_nested_array
   cwl_utils.tests.test_parser_utils.test_v_1_2_load_inputfile_with_requirements
   cwl_utils.tests.test_parser_utils.test_v_1_2_load_inputfile_with_secondary_files
   cwl_utils.tests.test_parser_utils.test_v1_2_stdout_to_file
   cwl_utils.tests.test_parser_utils.test_v1_2_stdout_to_file_with_binding
   cwl_utils.tests.test_parser_utils.test_v1_2_stdout_to_file_preserve_original
   cwl_utils.tests.test_parser_utils.test_v1_2_stderr_to_file
   cwl_utils.tests.test_parser_utils.test_v1_2_stderr_to_file_with_binding
   cwl_utils.tests.test_parser_utils.test_v1_2_stderr_to_file_preserve_original
   cwl_utils.tests.test_parser_utils.test_v1_2_stdin_to_file
   cwl_utils.tests.test_parser_utils.test_v1_2_stdin_to_file_with_binding
   cwl_utils.tests.test_parser_utils.test_v1_2_stdin_to_file_fail_with_original
   cwl_utils.tests.test_parser_utils.test_v1_2_type_compare_list
   cwl_utils.tests.test_parser_utils.test_v1_2_type_compare_record
   cwl_utils.tests.test_parser_utils.test_v1_2_type_for_source
   cwl_utils.tests.test_parser_utils.test_v1_2_type_for_source_with_id
   cwl_utils.tests.test_parser_utils.test_v1_2_type_for_stdout
   cwl_utils.tests.test_parser_utils.test_v1_2_type_output_source_record
   cwl_utils.tests.test_parser_utils.test_v1_2_type_for_output_source_with_single_scatter_step
   cwl_utils.tests.test_parser_utils.test_v1_2_type_for_output_source_with_nested_crossproduct_scatter_step
   cwl_utils.tests.test_parser_utils.test_v1_2_type_for_output_source_with_flat_crossproduct_scatter_step
   cwl_utils.tests.test_parser_utils.test_v1_2_type_for_source_with_multiple_entries_merge_nested
   cwl_utils.tests.test_parser_utils.test_v1_2_type_for_source_with_multiple_entries_merge_flattened
   cwl_utils.tests.test_parser_utils.test_v1_2_type_for_source_with_single_entry_merge_nested
   cwl_utils.tests.test_parser_utils.test_v1_2_type_for_source_with_single_entry_merge_flattened
   cwl_utils.tests.test_parser_utils.test_v1_2_type_for_source_with_multiple_entries_first_non_null
   cwl_utils.tests.test_parser_utils.test_v1_2_type_for_source_with_multiple_entries_the_only_non_null
   cwl_utils.tests.test_parser_utils.test_v1_2_type_for_source_with_multiple_entries_all_non_null
   cwl_utils.tests.test_parser_utils.test_v1_2_type_for_source_with_single_entry_first_non_null
   cwl_utils.tests.test_parser_utils.test_v1_2_type_for_source_with_single_entry_the_only_non_null
   cwl_utils.tests.test_parser_utils.test_v1_2_type_for_source_with_single_entry_all_non_null


Module Contents
---------------

.. py:function:: test_static_checker_fail(cwlVersion)

   Confirm that static type checker raises expected exception.


.. py:function:: test_static_checker_warning(caplog)

.. py:function:: test_static_checker_success(cwlVersion)

   Confirm that static type checker correctly validates workflows.


.. py:function:: test_v1_0_file_content_64_kB()

   Test that reading file content is allowed up to 64kB in CWL v1.0.


.. py:function:: test_v1_0_file_content_larger_than_64_kB()

   Test that reading file content is truncated to 64kB for larger files in CWL v1.0.


.. py:function:: test_v_1_0_load_inputfile_with_format()

   Test that File object with the `format` field is correctly loaded with CWL v1.0.


.. py:function:: test_v_1_0_load_inputfile_with_nested_array()

   Test that nested arrays are preserved when loading an input file with CWL v1.0.


.. py:function:: test_v_1_0_load_inputfile_with_secondary_files()

   Test that secondary files are treated as objects when loading an input file with CWL v1.0.


.. py:function:: test_v1_0_stdout_to_file()

   Test that stdout shortcut is converted to stdout parameter with CWL v1.0.


.. py:function:: test_v1_0_stdout_to_file_with_binding()

   Test that outputBinding is not allowed with stdout shortcut with CWL v1.0.


.. py:function:: test_v1_0_stdout_to_file_preserve_original()

   Test that stdout parameter prevails on stdout shortcut with CWL v1.0.


.. py:function:: test_v1_0_stderr_to_file()

   Test that stderr shortcut is converted to stderr parameter with CWL v1.0.


.. py:function:: test_v1_0_stderr_to_file_with_binding()

   Test that outputBinding is not allowed with stderr shortcut with CWL v1.0.


.. py:function:: test_v1_0_stderr_to_file_preserve_original()

   Test that stderr parameter prevails on stdout shortcut with CWL v1.0.


.. py:function:: test_v1_0_type_compare_list()

   Test that the type comparison works correctly a list type with CWL v1.0.


.. py:function:: test_v1_0_type_compare_record()

   Test that the type comparison works correctly a record type with CWL v1.0.


.. py:function:: test_v1_0_type_for_source()

   Test that the type is correctly inferred from a source id with CWL v1.0.


.. py:function:: test_v1_0_type_for_source_with_id()

   Test that the type is correctly inferred from a source id with CWL v1.0.


.. py:function:: test_v1_0_type_for_stdout()

   Test that the `stdout` type is correctly matched with the `File` type in CWL v1.0.


.. py:function:: test_v1_0_type_output_source_record()

   Test that the type is correctly inferred from a record output source with CWL v1.0.


.. py:function:: test_v1_0_type_for_output_source_with_single_scatter_step()

   Test that the type is correctly inferred from a single scatter step with CWL v1.0.


.. py:function:: test_v1_0_type_for_output_source_with_nested_crossproduct_scatter_step()

   Test that the type is correctly inferred from a nested_crossproduct scatter step with CWL v1.0.


.. py:function:: test_v1_0_type_for_output_source_with_flat_crossproduct_scatter_step()

   Test that the type is correctly inferred from a flat_crossproduct scatter step with CWL v1.0.


.. py:function:: test_v1_0_type_for_source_with_multiple_entries_merge_nested()

   Test that the type is correctly inferred from a list of source ids and merge_nested with CWL v1.0.


.. py:function:: test_v1_0_type_for_source_with_multiple_entries_merge_flattened()

   Test that the type is correctly inferred from a list of source ids and merge_flattened with CWL v1.0.


.. py:function:: test_v1_0_type_for_source_with_single_entry_merge_nested()

   Test that the type is correctly inferred from a single source id and merge_nested with CWL v1.0.


.. py:function:: test_v1_0_type_for_source_with_single_entry_merge_flattened()

   Test that the type is correctly inferred from a single source id and merge_flattened with CWL v1.0.


.. py:function:: test_v1_1_file_content_64_kB()

   Test that reading file content is allowed up to 64kB in CWL v1.1.


.. py:function:: test_v1_1_file_content_larger_than_64_kB()

   Test that reading file content is truncated to 64kB for larger files in CWL v1.1.


.. py:function:: test_v_1_1_load_inputfile_with_format()

   Test that File object with the `format` field is correctly loaded with CWL v1.1.


.. py:function:: test_v_1_1_load_inputfile_with_nested_array()

   Test that nested arrays are preserved when loading an input file with CWL v1.1.


.. py:function:: test_v_1_1_load_inputfile_with_requirements()

   Test that an input file with the cwl:requirements directive is correctly loaded with CWL v1.1.


.. py:function:: test_v_1_1_load_inputfile_with_secondary_files()

   Test that secondary files are treated as objects when loading an input file with CWL v1.1.


.. py:function:: test_v1_1_stdout_to_file()

   Test that stdout shortcut is converted to stdout parameter with CWL v1.1.


.. py:function:: test_v1_1_stdout_to_file_with_binding()

   Test that outputBinding is not allowed with stdout shortcut with CWL v1.1.


.. py:function:: test_v1_1_stdout_to_file_preserve_original()

   Test that stdout parameter prevails on stdout shortcut with CWL v1.1.


.. py:function:: test_v1_1_stderr_to_file()

   Test that stderr shortcut is converted to stderr parameter with CWL v1.1.


.. py:function:: test_v1_1_stderr_to_file_with_binding()

   Test that outputBinding is not allowed with stderr shortcut with CWL v1.1.


.. py:function:: test_v1_1_stderr_to_file_preserve_original()

   Test that stderr parameter prevails on stdout shortcut with CWL v1.1.


.. py:function:: test_v1_1_stdin_to_file()

   Test that stdin shortcut is converted to stdin parameter with CWL v1.1.


.. py:function:: test_v1_1_stdin_to_file_with_binding()

   Test that inputBinding is not allowed with stdin shortcut with CWL v1.1.


.. py:function:: test_v1_1_stdin_to_file_fail_with_original()

   Test that stdin shortcut fails when stdin parameter is defined with CWL v1.1.


.. py:function:: test_v1_1_type_compare_list()

   Test that the type comparison works correctly a list type with CWL v1.1.


.. py:function:: test_v1_1_type_compare_record()

   Test that the type comparison works correctly a record type with CWL v1.1.


.. py:function:: test_v1_1_type_for_source()

   Test that the type is correctly inferred from a source id with CWL v1.1.


.. py:function:: test_v1_1_type_for_source_with_id()

   Test that the type is correctly inferred from a source id with CWL v1.1.


.. py:function:: test_v1_1_type_for_stdout()

   Test that the `stdout` type is correctly matched with the `File` type in CWL v1.1.


.. py:function:: test_v1_1_type_output_source_record()

   Test that the type is correctly inferred from a record output source with CWL v1.1.


.. py:function:: test_v1_1_type_for_output_source_with_single_scatter_step()

   Test that the type is correctly inferred from a single scatter step with CWL v1.1.


.. py:function:: test_v1_1_type_for_output_source_with_nested_crossproduct_scatter_step()

   Test that the type is correctly inferred from a nested_crossproduct scatter step with CWL v1.1.


.. py:function:: test_v1_1_type_for_output_source_with_flat_crossproduct_scatter_step()

   Test that the type is correctly inferred from a flat_crossproduct scatter step with CWL v1.1.


.. py:function:: test_v1_1_type_for_source_with_multiple_entries_merge_nested()

   Test that the type is correctly inferred from a list of source ids and merge_nested with CWL v1.1.


.. py:function:: test_v1_1_type_for_source_with_multiple_entries_merge_flattened()

   Test that the type is correctly inferred from a list of source ids and merge_flattened with CWL v1.1.


.. py:function:: test_v1_1_type_for_source_with_single_entry_merge_nested()

   Test that the type is correctly inferred from a single source id and merge_nested with CWL v1.1.


.. py:function:: test_v1_1_type_for_source_with_single_entry_merge_flattened()

   Test that the type is correctly inferred from a single source id and merge_flattened with CWL v1.1.


.. py:function:: test_v1_2_file_content_64_kB()

   Test that reading file content is allowed up to 64kB in CWL v1.2.


.. py:function:: test_v1_2_file_content_larger_than_64_kB()

   Test that reading file content fails for files larger than 64kB in CWL v1.0.


.. py:function:: test_v_1_2_load_inputfile_with_format()

   Test that File object with the `format` field is correctly loaded with CWL v1.2.


.. py:function:: test_v_1_2_load_inputfile_with_nested_array()

   Test that nested arrays are preserved when loading an input file with CWL v1.2.


.. py:function:: test_v_1_2_load_inputfile_with_requirements()

   Test that an input file with the cwl:requirements directive is correctly loaded with CWL v1.2.


.. py:function:: test_v_1_2_load_inputfile_with_secondary_files()

   Test that secondary files are treated as objects when loading an input file with CWL v1.2.


.. py:function:: test_v1_2_stdout_to_file()

   Test that stdout shortcut is converted to stdout parameter with CWL v1.2.


.. py:function:: test_v1_2_stdout_to_file_with_binding()

   Test that outputBinding is not allowed with stdout shortcut with CWL v1.2.


.. py:function:: test_v1_2_stdout_to_file_preserve_original()

   Test that stdout parameter prevails on stdout shortcut with CWL v1.2.


.. py:function:: test_v1_2_stderr_to_file()

   Test that stderr shortcut is converted to stderr parameter with CWL v1.2.


.. py:function:: test_v1_2_stderr_to_file_with_binding()

   Test that outputBinding is not allowed with stderr shortcut with CWL v1.2.


.. py:function:: test_v1_2_stderr_to_file_preserve_original()

   Test that stderr parameter prevails on stdout shortcut with CWL v1.2.


.. py:function:: test_v1_2_stdin_to_file()

   Test that stdin shortcut is converted to stdin parameter with CWL v1.2.


.. py:function:: test_v1_2_stdin_to_file_with_binding()

   Test that inputBinding is not allowed with stdin shortcut with CWL v1.2.


.. py:function:: test_v1_2_stdin_to_file_fail_with_original()

   Test that stdin shortcut fails when stdin parameter is defined with CWL v1.2.


.. py:function:: test_v1_2_type_compare_list()

   Test that the type comparison works correctly a list type with CWL v1.2.


.. py:function:: test_v1_2_type_compare_record()

   Test that the type comparison works correctly a record type with CWL v1.2.


.. py:function:: test_v1_2_type_for_source()

   Test that the type is correctly inferred from a source id with CWL v1.2.


.. py:function:: test_v1_2_type_for_source_with_id()

   Test that the type is correctly inferred from a source id with CWL v1.2.


.. py:function:: test_v1_2_type_for_stdout()

   Test that the `stdout` type is correctly matched with the `File` type in CWL v1.2.


.. py:function:: test_v1_2_type_output_source_record()

   Test that the type is correctly inferred from a record output source with CWL v1.2.


.. py:function:: test_v1_2_type_for_output_source_with_single_scatter_step()

   Test that the type is correctly inferred from a single scatter step with CWL v1.2.


.. py:function:: test_v1_2_type_for_output_source_with_nested_crossproduct_scatter_step()

   Test that the type is correctly inferred from a nested_crossproduct scatter step with CWL v1.2.


.. py:function:: test_v1_2_type_for_output_source_with_flat_crossproduct_scatter_step()

   Test that the type is correctly inferred from a flat_crossproduct scatter step with CWL v1.2.


.. py:function:: test_v1_2_type_for_source_with_multiple_entries_merge_nested()

   Test that the type is correctly inferred from a list of source ids and merge_nested with CWL v1.2.


.. py:function:: test_v1_2_type_for_source_with_multiple_entries_merge_flattened()

   Test that the type is correctly inferred from a list of source ids and merge_flattened with CWL v1.2.


.. py:function:: test_v1_2_type_for_source_with_single_entry_merge_nested()

   Test that the type is correctly inferred from a single source id and merge_nested with CWL v1.2.


.. py:function:: test_v1_2_type_for_source_with_single_entry_merge_flattened()

   Test that the type is correctly inferred from a single source id and merge_flattened with CWL v1.2.


.. py:function:: test_v1_2_type_for_source_with_multiple_entries_first_non_null()

   Test that the type is correctly inferred from a list of source ids and first_non_null with CWL v1.2.


.. py:function:: test_v1_2_type_for_source_with_multiple_entries_the_only_non_null()

   Test that the type is correctly inferred from a list of source ids and the_only_non_null with CWL v1.2.


.. py:function:: test_v1_2_type_for_source_with_multiple_entries_all_non_null()

   Test that the type is correctly inferred from a list of source ids and all_non_null with CWL v1.2.


.. py:function:: test_v1_2_type_for_source_with_single_entry_first_non_null()

   Test that the type is correctly inferred from a single source id and first_non_null with CWL v1.2.


.. py:function:: test_v1_2_type_for_source_with_single_entry_the_only_non_null()

   Test that the type is correctly inferred from a single source id and the_only_non_null with CWL v1.2.


.. py:function:: test_v1_2_type_for_source_with_single_entry_all_non_null()

   Test that the type is correctly inferred from a single source id and all_non_null with CWL v1.2.


