Example #1
0
def test_compute_checksum():
    runtime_context = RuntimeContext()
    runtime_context.compute_checksum = True
    runtime_context.use_container = onWindows()
    factory = cwltool.factory.Factory(runtime_context=runtime_context)
    echo = factory.make(get_data("tests/wf/cat-tool.cwl"))
    output = echo(
        file1={"class": "File",
               "location": get_data("tests/wf/whale.txt")},
        reverse=False)
    assert output['output']["checksum"] == "sha1$327fc7aedf4f6b69a42a7c8b808dc5a7aff61376"
Example #2
0
 def test_compute_checksum(self):
     runtime_context = RuntimeContext()
     runtime_context.compute_checksum = True
     runtime_context.use_container = onWindows()
     f = cwltool.factory.Factory(runtime_context=runtime_context)
     echo = f.make(get_data("tests/wf/cat-tool.cwl"))
     output = echo(
         file1={"class": "File",
                "location": get_data("tests/wf/whale.txt")},
         reverse=False)
     self.assertEquals(output['output']["checksum"], "sha1$327fc7aedf4f6b69a42a7c8b808dc5a7aff61376")
Example #3
0
def test_compute_checksum() -> None:
    runtime_context = RuntimeContext()
    runtime_context.compute_checksum = True
    runtime_context.use_container = onWindows()
    factory = cwltool.factory.Factory(runtime_context=runtime_context)
    echo = factory.make(get_data("tests/wf/cat-tool.cwl"))
    output = echo(
        file1={"class": "File", "location": get_data("tests/wf/whale.txt")},
        reverse=False,
    )
    assert isinstance(output, dict)
    result = output["output"]
    assert isinstance(result, dict)
    assert result["checksum"] == "sha1$327fc7aedf4f6b69a42a7c8b808dc5a7aff61376"