How to use the cwltest.CompareFail function in cwltest

To help you get started, we’ve selected a few cwltest examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github common-workflow-language / cwltest / tests / test_compare.py View on Github external
expected = {
            "location": "cores.txt",
            "size": 2,
            "class": "File",
            "contents": "2"
        }

        actual = {
            "basename": "cores.txt",
            "checksum": "sha1$7448d8798a4380162d4b56f9b452e2f6f9e24e7a",
            "class": "File",
            "location": "file:///var/folders/8x/2df05_7j20j6r8y81w4qf43r0000gn/T/tmpG0EkrS/cores.txt",
            "path": get_data("tests/test-data/cores.txt"),
            "size": 2
        }
        with self.assertRaises(CompareFail):
            compare_file(expected, actual)
github common-workflow-language / cwltest / tests / test_compare.py View on Github external
"size": 2,
            "class": "File",
            "checksum": "sha1$7448d8798a4380162d4b56f9b452e2f6f9e24e7a"
        }

        actual = {
            "basename": "cores.txt",
            "checksum": "sha1$7448d8798a4380162d4b56f9b452e2f6f9e24e7a",
            "class": "File",
            "location": "file:///var/folders/8x/2df05_7j20j6r8y81w4qf43r0000gn/T/tmpG0EkrS/cores.txt",
            "path": "/var/folders/8x/2df05_7j20j6r8y81w4qf43r0000gn/T/tmpG0EkrS/cores.txt",
            "size": 2
        }
        try:
            compare_file(expected, actual)
        except CompareFail:
            self.fail("File comparison failed unexpectedly")