toil.test.cwl.cwlTest¶
Attributes¶
Classes¶
CWL tests included in Toil that don't involve the whole CWL conformance |
|
Run the CWL 1.0 conformance tests in various environments. |
|
Run the CWL 1.1 conformance tests in various environments. |
|
Run the CWL 1.2 conformance tests in various environments. |
|
Detect the import workers log message and set a flag. |
Functions¶
|
Run the CWL conformance tests. |
|
|
|
|
|
|
|
Make sure we don't just stage files over each other when using a container. |
|
Make sure we don't just stage files over each other. |
Make sure toil-cwl-runner does not false log a warning when pickValue is |
|
|
Make sure that download_structure makes the right calls to what it thinks is the file store. |
Module Contents¶
- toil.test.cwl.cwlTest.pkg_root¶
- toil.test.cwl.cwlTest.CONFORMANCE_TEST_TIMEOUT = 10000¶
- toil.test.cwl.cwlTest.run_conformance_tests(workDir, yml, runner=None, caching=False, batchSystem=None, selected_tests=None, selected_tags=None, skipped_tests=None, extra_args=None, must_support_all_features=False, junit_file=None)[source]¶
Run the CWL conformance tests.
- Parameters:
workDir (str) – Directory to run tests in.
yml (str) – CWL test list YML to run tests from.
runner (Optional[str]) – If set, use this cwl runner instead of the default toil-cwl-runner.
caching (bool) – If True, use Toil file store caching.
batchSystem (Optional[str]) – If set, use this batch system instead of the default single_machine.
selected_tests (Optional[str]) – If set, use this description of test numbers to run (comma-separated numbers or ranges)
selected_tags (Optional[str]) – As an alternative to selected_tests, run tests with the given tags.
skipped_tests (Optional[str]) – Comma-separated string labels of tests to skip.
extra_args (Optional[List[str]]) – Provide these extra arguments to runner for each test.
must_support_all_features (bool) – If set, fail if some CWL optional features are unsupported.
junit_file (Optional[str]) – JUnit XML file to write test info to.
- Return type:
None
- toil.test.cwl.cwlTest.TesterFuncType¶
- class toil.test.cwl.cwlTest.CWLWorkflowTest(methodName='runTest')[source]¶
Bases:
toil.test.ToilTest
CWL tests included in Toil that don’t involve the whole CWL conformance test suite. Tests Toil-specific functions like URL types supported for inputs.
- test_cwl_cmdline_input()[source]¶
Test that running a CWL workflow with inputs specified on the command line passes.
- Return type:
None
- revsort(cwl_filename, tester_fn)[source]¶
- Parameters:
cwl_filename (str)
tester_fn (TesterFuncType)
- Return type:
None
- revsort_no_checksum(cwl_filename, tester_fn)[source]¶
- Parameters:
cwl_filename (str)
tester_fn (TesterFuncType)
- Return type:
None
- download(inputs, tester_fn)[source]¶
- Parameters:
inputs (str)
tester_fn (TesterFuncType)
- Return type:
None
- load_contents(inputs, tester_fn)[source]¶
- Parameters:
inputs (str)
tester_fn (TesterFuncType)
- Return type:
None
- download_directory(inputs, tester_fn)[source]¶
- Parameters:
inputs (str)
tester_fn (TesterFuncType)
- Return type:
None
- download_subdirectory(inputs, tester_fn)[source]¶
- Parameters:
inputs (str)
tester_fn (TesterFuncType)
- Return type:
None
- test_restart()[source]¶
Enable restarts with toil-cwl-runner – run failing test, re-run correct test. Only implemented for single machine.
- Return type:
None
- test_streamable(extra_args=None)[source]¶
Test that a file with ‘streamable’=True is a named pipe. This is a CWL1.2 feature.
- Parameters:
extra_args (Optional[List[str]])
- Return type:
None
- test_streamable_reference()[source]¶
Test that a streamable file is a stream even when passed around by URI.
- Return type:
None
- test_preemptible()[source]¶
Tests that the http://arvados.org/cwl#UsePreemptible extension is supported.
- Return type:
None
- test_preemptible_expression()[source]¶
Tests that the http://arvados.org/cwl#UsePreemptible extension is validated.
- Return type:
None
- class toil.test.cwl.cwlTest.CWLv10Test(methodName='runTest')[source]¶
Bases:
toil.test.ToilTest
Run the CWL 1.0 conformance tests in various environments.
- test_run_conformance(batchSystem=None, caching=False, selected_tests=None, skipped_tests=None, extra_args=None)[source]¶
- test_gridengine_cwl_conformance(caching=False)[source]¶
- Parameters:
caching (bool)
- Return type:
None
- class toil.test.cwl.cwlTest.CWLv11Test(methodName='runTest')[source]¶
Bases:
toil.test.ToilTest
Run the CWL 1.1 conformance tests in various environments.
- class toil.test.cwl.cwlTest.CWLv12Test(methodName='runTest')[source]¶
Bases:
toil.test.ToilTest
Run the CWL 1.2 conformance tests in various environments.
- test_run_conformance(runner=None, caching=False, batchSystem=None, selected_tests=None, skipped_tests=None, extra_args=None, must_support_all_features=False, junit_file=None)[source]¶
- test_run_conformance_with_in_place_update()[source]¶
Make sure that with –bypass-file-store we properly support in place update on a single node, and that this doesn’t break any other features.
- Return type:
None
- test_wes_server_cwl_conformance()[source]¶
Run the CWL conformance tests via WES. TOIL_WES_ENDPOINT must be specified. If the WES server requires authentication, set TOIL_WES_USER and TOIL_WES_PASSWORD.
To run manually:
TOIL_WES_ENDPOINT=http://localhost:8080 TOIL_WES_USER=test TOIL_WES_PASSWORD=password python -m pytest src/toil/test/cwl/cwlTest.py::CWLv12Test::test_wes_server_cwl_conformance -vv –log-level INFO –log-cli-level INFO
- Return type:
None
- toil.test.cwl.cwlTest.test_workflow_echo_string_scatter_stderr_log_dir(tmp_path)[source]¶
- Parameters:
tmp_path (pathlib.Path)
- Return type:
None
- toil.test.cwl.cwlTest.test_log_dir_echo_no_output(tmp_path)[source]¶
- Parameters:
tmp_path (pathlib.Path)
- Return type:
None
- toil.test.cwl.cwlTest.test_log_dir_echo_stderr(tmp_path)[source]¶
- Parameters:
tmp_path (pathlib.Path)
- Return type:
None
- toil.test.cwl.cwlTest.test_filename_conflict_resolution(tmp_path)[source]¶
- Parameters:
tmp_path (pathlib.Path)
- Return type:
None
- toil.test.cwl.cwlTest.test_filename_conflict_resolution_3_or_more(tmp_path)[source]¶
- Parameters:
tmp_path (pathlib.Path)
- Return type:
None
- toil.test.cwl.cwlTest.test_filename_conflict_detection(tmp_path)[source]¶
Make sure we don’t just stage files over each other when using a container.
- Parameters:
tmp_path (pathlib.Path)
- Return type:
None
- toil.test.cwl.cwlTest.test_filename_conflict_detection_at_root(tmp_path)[source]¶
Make sure we don’t just stage files over each other.
Specifically, when using a container and the files are at the root of the work dir.
- Parameters:
tmp_path (pathlib.Path)
- Return type:
None
- toil.test.cwl.cwlTest.test_pick_value_with_one_null_value(caplog)[source]¶
Make sure toil-cwl-runner does not false log a warning when pickValue is used but outputSource only contains one null value. See: #3991.
- Parameters:
caplog (pytest.LogCaptureFixture)
- Return type:
None
- toil.test.cwl.cwlTest.test_download_structure(tmp_path)[source]¶
Make sure that download_structure makes the right calls to what it thinks is the file store.
- Parameters:
tmp_path (pathlib.Path)
- Return type:
None
- class toil.test.cwl.cwlTest.ImportWorkersMessageHandler[source]¶
Bases:
_stream_handler
Detect the import workers log message and set a flag.
- detected = False¶
- emit(record)[source]¶
Emit a record.
If a formatter is specified, it is used to format the record. The record is then written to the stream with a trailing newline. If exception information is present, it is formatted using traceback.print_exception and appended to the stream. If the stream has an ‘encoding’ attribute, it is used to determine how to do the output to the stream.
- Parameters:
record (logging.LogRecord)
- Return type:
None