14
14
15
15
def test_unsupported_with_required_tests () -> None :
16
16
cwl_runner = get_data ("tests/test-data/mock_cwl_runner.py" )
17
- args = [
18
- "--test" ,
19
- schema_salad .ref_resolver .file_uri (
20
- get_data ("tests/test-data/required-unsupported.yml" )
21
- ),
22
- ]
23
17
cwd = os .getcwd ()
18
+ os .chdir (get_data ("tests/test-data/" ))
19
+ args = ["--test" , "required-unsupported.yml" ]
24
20
try :
25
- os .chdir (get_data ("tests/test-data/" ))
26
21
error_code , stdout , stderr = run_with_mock_cwl_runner (args )
27
22
finally :
28
23
os .chdir (cwd )
@@ -35,21 +30,19 @@ def test_unsupported_with_required_tests() -> None:
35
30
else :
36
31
q = ""
37
32
assert (
38
- "The `id` field is missing.{n}"
39
- "The `id` field is missing.{n}"
40
- "Test [1/2] Required test that is unsupported (without tags){n}"
41
- "{n}"
42
- "Test 1 failed: {cwl_runner} --quiet return-unsupported.cwl {q}v1.0{p}cat-job.json{q}{n}"
43
- "Required test that is unsupported (without tags){n}"
44
- "Does not support required feature{n}"
45
- "Test [2/2] Required test that is unsupported (with tags){n}"
46
- "{n}"
47
- "Test 2 failed: {cwl_runner} --quiet return-unsupported.cwl {q}v1.0{p}cat-job.json{q}{n}"
48
- "Required test that is unsupported (with tags){n}"
49
- "Does not support required feature{n}"
50
- "0 tests passed, 2 failures, 0 unsupported features{n}" .format (
51
- cwl_runner = cwl_runner , n = n , p = p , q = q
52
- )
33
+ f"The `id` field is missing.{ n } "
34
+ f"The `id` field is missing.{ n } "
35
+ f"Test [1/2] Required test that is unsupported (without tags){ n } "
36
+ f"{ n } "
37
+ f"Test 1 failed: { cwl_runner } --quiet return-unsupported.cwl { q } v1.0{ p } cat-job.json{ q } { n } "
38
+ f"Required test that is unsupported (without tags){ n } "
39
+ f"Does not support required feature{ n } "
40
+ f"Test [2/2] Required test that is unsupported (with tags){ n } "
41
+ f"{ n } "
42
+ f"Test 2 failed: { cwl_runner } --quiet return-unsupported.cwl { q } v1.0{ p } cat-job.json{ q } { n } "
43
+ f"Required test that is unsupported (with tags){ n } "
44
+ f"Does not support required feature{ n } "
45
+ f"0 tests passed, 2 failures, 0 unsupported features{ n } "
53
46
) == stderr
54
47
55
48
0 commit comments