@@ -26,7 +26,7 @@ def test_pack():
26
26
with open (get_data ("tests/wf/expect_packed.cwl" )) as packed_file :
27
27
expect_packed = yaml .safe_load (packed_file )
28
28
29
- packed = cwltool .pack .pack (loadingContext . loader , uri , loadingContext . metadata )
29
+ packed = cwltool .pack .pack (loadingContext , uri )
30
30
adjustFileObjs (
31
31
packed , partial (make_relative , os .path .abspath (get_data ("tests/wf" )))
32
32
)
@@ -53,7 +53,7 @@ def test_pack_input_named_name():
53
53
with open (get_data ("tests/wf/expect_trick_packed.cwl" )) as packed_file :
54
54
expect_packed = yaml .round_trip_load (packed_file )
55
55
56
- packed = cwltool .pack .pack (loadingContext . loader , uri , loadingContext . metadata )
56
+ packed = cwltool .pack .pack (loadingContext , uri )
57
57
adjustFileObjs (
58
58
packed , partial (make_relative , os .path .abspath (get_data ("tests/wf" )))
59
59
)
@@ -77,7 +77,7 @@ def test_pack_single_tool():
77
77
)
78
78
processobj = loadingContext .loader .resolve_ref (uri )[0 ]
79
79
80
- packed = cwltool .pack .pack (loadingContext . loader , uri , loadingContext . metadata )
80
+ packed = cwltool .pack .pack (loadingContext , uri )
81
81
assert "$schemas" in packed
82
82
83
83
@@ -86,9 +86,7 @@ def test_pack_fragment():
86
86
expect_packed = yaml .safe_load (packed_file )
87
87
88
88
loadingContext , workflowobj , uri = fetch_document (get_data ("tests/wf/scatter2.cwl" ))
89
- packed = cwltool .pack .pack (
90
- loadingContext .loader , uri + "#scatterstep/mysub" , loadingContext .metadata
91
- )
89
+ packed = cwltool .pack .pack (loadingContext , uri + "#scatterstep/mysub" )
92
90
adjustFileObjs (
93
91
packed , partial (make_relative , os .path .abspath (get_data ("tests/wf" )))
94
92
)
@@ -112,7 +110,7 @@ def test_pack_rewrites():
112
110
processobj = loadingContext .loader .resolve_ref (uri )[0 ]
113
111
114
112
cwltool .pack .pack (
115
- loadingContext . loader , uri , loadingContext . metadata , rewrite_out = rewrites ,
113
+ loadingContext , uri , rewrite_out = rewrites ,
116
114
)
117
115
118
116
assert len (rewrites ) == 6
@@ -136,7 +134,7 @@ def test_pack_missing_cwlVersion(cwl_path):
136
134
processobj = loadingContext .loader .resolve_ref (uri )[0 ]
137
135
138
136
# generate pack output dict
139
- packed = json .loads (print_pack (loadingContext . loader , uri , loadingContext . metadata ))
137
+ packed = json .loads (print_pack (loadingContext , uri ))
140
138
141
139
assert packed ["cwlVersion" ] == "v1.0"
142
140
@@ -160,7 +158,7 @@ def _pack_idempotently(document):
160
158
processobj = loadingContext .loader .resolve_ref (uri )[0 ]
161
159
162
160
# generate pack output dict
163
- packed_text = print_pack (loadingContext . loader , uri , loadingContext . metadata )
161
+ packed_text = print_pack (loadingContext , uri )
164
162
packed = json .loads (packed_text )
165
163
166
164
tmp = NamedTemporaryFile (mode = "w" , delete = False )
@@ -177,7 +175,7 @@ def _pack_idempotently(document):
177
175
processobj = loadingContext .loader .resolve_ref (uri2 )[0 ]
178
176
179
177
# generate pack output dict
180
- packed_text = print_pack (loadingContext . loader , uri2 , loadingContext . metadata )
178
+ packed_text = print_pack (loadingContext , uri2 )
181
179
double_packed = json .loads (packed_text )
182
180
finally :
183
181
os .remove (tmp .name )
@@ -203,7 +201,7 @@ def test_packed_workflow_execution(wf_path, job_path, namespaced, tmpdir):
203
201
loadingContext , workflowobj , uri
204
202
)
205
203
processobj = loadingContext .loader .resolve_ref (uri )[0 ]
206
- packed = json .loads (print_pack (loadingContext . loader , uri , loadingContext . metadata ))
204
+ packed = json .loads (print_pack (loadingContext , uri ))
207
205
208
206
assert not namespaced or "$namespaces" in packed
209
207
0 commit comments