File tree 2 files changed +16
-18
lines changed
2 files changed +16
-18
lines changed Original file line number Diff line number Diff line change @@ -1498,9 +1498,9 @@ def collect_output(
1498
1498
1499
1499
def recursively_insert (j_dict : Any , key : Any , val : Any ) -> Any :
1500
1500
"""Recursively insert a value into any dictionary."""
1501
- if isinstance (j_dict , List ):
1501
+ if isinstance (j_dict , MutableSequence ):
1502
1502
return [recursively_insert (x , key , val ) for x in j_dict ]
1503
- if isinstance (j_dict , Dict ):
1503
+ if isinstance (j_dict , MutableMapping ):
1504
1504
if j_dict .get ("class" ) == "File" :
1505
1505
j_dict [key ] = val
1506
1506
else :
Original file line number Diff line number Diff line change 1
- import subprocess
2
- import sys
3
1
from pathlib import Path
2
+ import pytest
3
+ from .util import get_data , get_main_output
4
4
5
- from .util import get_data
6
-
7
-
8
- def test_output_2D_file_format () -> None :
5
+ @pytest .fixture (scope = "session" )
6
+ def test_output_2d_file_format (tmp_path_factory : pytest .TempPathFactory ) -> None :
9
7
"""A simple test for format tag fix for 2D output arrays."""
10
8
11
- Path ( "filename.txt" ). touch ( )
12
- params = [
13
- sys . executable ,
14
- "-m" ,
15
- "cwltool " ,
16
- "--cachedir" , # just so that the relative path of file works out
17
- "foo" ,
18
- get_data ( "tests/output_2D_file_format.cwl" ),
19
- ]
9
+ tmp_path : Path = tmp_path_factory . mktemp ( "tmp" )
10
+ # still need to create 'filename.txt' as it is needed in output_2D_file_format.cwl
11
+ _ = tmp_path / "filename.txt"
12
+ commands = [
13
+ "--cachedir " ,
14
+ str ( tmp_path / "foo" ), # just so that the relative path of file works out
15
+ get_data ( "tests/output_2D_file_format.cwl" )]
16
+
17
+ error_code , _ , stderr = get_main_output ( commands )
20
18
21
- assert subprocess . check_call ( params ) == 0
19
+ assert error_code == 0 , stderr
You can’t perform that action at this time.
0 commit comments