@@ -41,25 +41,41 @@ def test_invalid_target(tmp_path: Path) -> None:
41
41
assert result is None
42
42
43
43
44
- def test_v1_0_to_v1_1 (tmp_path : Path ) -> None :
45
- """Basic CWL v1.0 to CWL v1.1 test."""
44
+ def test_v1_0_to_v1_1_load_listing (tmp_path : Path ) -> None :
45
+ """Basic CWL v1.0 to CWL v1.1 test with LoadListingRequirement (map notation) ."""
46
46
doc = load_cwl_document (get_data ("testdata/v1.0/listing_deep1.cwl" ))
47
47
upgraded = upgrade_document (doc , str (tmp_path ), "v1.1" )
48
- assert doc == upgraded
48
+ expected = load_cwl_document (get_data ("testdata/v1.1/listing_deep1.cwl" ))
49
+ assert upgraded == expected
50
+
51
+
52
+ def test_v1_0_to_v1_1_load_listing_arr (tmp_path : Path ) -> None :
53
+ """Basic CWL v1.0 to CWL v1.1 test with LoadListingRequirement (array notation)."""
54
+ doc = load_cwl_document (get_data ("testdata/v1.0/listing_deep1-arr.cwl" ))
55
+ upgraded = upgrade_document (doc , str (tmp_path ), "v1.1" )
56
+ expected = load_cwl_document (get_data ("testdata/v1.1/listing_deep1-arr.cwl" ))
57
+ assert upgraded == expected
58
+
59
+
60
+ def test_v1_0_to_v1_1_network_access (tmp_path : Path ) -> None :
61
+ """Basic CWL v1.0 to CWL v1.1 test with NetworkAccess."""
62
+ doc = load_cwl_document (get_data ("testdata/v1.0/networkaccess.cwl" ))
63
+ upgraded = upgrade_document (doc , str (tmp_path ), "v1.1" )
64
+ expected = load_cwl_document (get_data ("testdata/v1.1/networkaccess.cwl" ))
65
+ assert upgraded == expected
49
66
50
67
51
68
def test_v1_1_to_v1_2 (tmp_path : Path ) -> None :
52
69
"""Basic CWL v1.1 to CWL v1.2 test."""
53
70
doc = load_cwl_document (get_data ("testdata/v1.1/listing_deep1.cwl" ))
54
71
upgraded = upgrade_document (doc , str (tmp_path ), "v1.2" )
55
- assert doc == upgraded
72
+ expected = load_cwl_document (get_data ("testdata/v1.2/listing_deep1.cwl" ))
73
+ assert upgraded == expected
56
74
57
75
58
76
def test_packed_graph (tmp_path : Path ) -> None :
59
77
"""Test packed document with $graph."""
60
- main (
61
- [f"--dir={ tmp_path } " , "--v1.1-only" , get_data ("testdata/v1.0/conflict-wf.cwl" )]
62
- )
78
+ main ([f"--dir={ tmp_path } " , "--v1.1-only" , get_data ("testdata/v1.0/conflict-wf.cwl" )])
63
79
assert filecmp .cmp (
64
80
get_data ("testdata/v1.1/conflict-wf.cwl" ),
65
81
tmp_path / "conflict-wf.cwl" ,
0 commit comments