Skip to content

Commit 0f9117e

Browse files
committed
test_catories path fixes
1 parent 4b106d3 commit 0f9117e

File tree

1 file changed

+15
-22
lines changed

1 file changed

+15
-22
lines changed

tests/test_categories.py

Lines changed: 15 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,10 @@
1414

1515
def test_unsupported_with_required_tests() -> None:
1616
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-
]
2317
cwd = os.getcwd()
18+
os.chdir(get_data("tests/test-data/"))
19+
args = ["--test", "required-unsupported.yml"]
2420
try:
25-
os.chdir(get_data("tests/test-data/"))
2621
error_code, stdout, stderr = run_with_mock_cwl_runner(args)
2722
finally:
2823
os.chdir(cwd)
@@ -35,21 +30,19 @@ def test_unsupported_with_required_tests() -> None:
3530
else:
3631
q = ""
3732
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}"
5346
) == stderr
5447

5548

0 commit comments

Comments
 (0)