diff --git a/src/toil/test/wdl/wdltoil_test.py b/src/toil/test/wdl/wdltoil_test.py index c53bccb458..050c6ef207 100644 --- a/src/toil/test/wdl/wdltoil_test.py +++ b/src/toil/test/wdl/wdltoil_test.py @@ -1,4 +1,3 @@ -import hashlib import json import os import shutil @@ -9,58 +8,12 @@ from urllib.request import urlretrieve import pytest -import re from toil.test import ToilTest, needs_docker, needs_docker_cuda, needs_java, needs_singularity, slow from toil.version import exactPython # Don't import the test case directly or pytest will test it again. import toil.test.wdl.toilwdlTest - -class ToilConformanceTests(toil.test.wdl.toilwdlTest.BaseToilWdlTest): - """ - New WDL conformance tests for Toil - """ - @classmethod - def setUpClass(cls) -> None: - os.system("git clone -b move-toil-tests https://github.com/DataBiosphere/wdl-conformance-tests.git") - assert os.path.exists("wdl-conformance-tests"), "Failed to git clone!" - os.chdir("wdl-conformance-tests") - cls.base_command = [exactPython, "run.py", "--runner", "toil-wdl-runner"] - - def test_conformance_tests_v10(self): - tests_to_run = "0,1,5-7,9-15,17,22-24,26,28-30,32-40,53,57-59,62,67-69" - p = subprocess.Popen(self.base_command + ["-v", "1.0", "-n", tests_to_run], stdout=subprocess.PIPE, stderr=subprocess.PIPE) - stdout, stderr = p.communicate() - assert b": FAILED:" not in stdout, f"At least one conformance test failed!\n" \ - f"Failed tests: {' '.join(self.find_failed_tests(stdout))}" - - def test_conformance_tests_v11(self): - tests_to_run = "2-11,13-15,17-20,22-24,26,29,30,32-40,53,57-59,62,67-69" - p = subprocess.Popen(self.base_command + ["-v", "1.1", "-n", tests_to_run], stdout=subprocess.PIPE, stderr=subprocess.PIPE) - stdout, stderr = p.communicate() - assert b": FAILED:" not in stdout, f"At least one conformance test failed!\n" \ - f"Failed tests: {' '.join(self.find_failed_tests(stdout))}" - - - def find_failed_tests(self, stream): - """ - Parse output and find all tests that failed - :return: - """ - pattern = rb"\d+: FAILED:" - matches = re.findall(pattern, stream) - failed_tests = [test[0:test.find(b":")].decode() for test in matches] - return failed_tests - - - @classmethod - def tearDownClass(cls) -> None: - upper_dir = os.path.dirname(os.getcwd()) - os.chdir(upper_dir) - shutil.rmtree("wdl-conformance-tests") - - class WdlToilTest(toil.test.wdl.toilwdlTest.ToilWdlTest): """ Version of the old Toil WDL tests that tests the new MiniWDL-based implementation.