File tree Expand file tree Collapse file tree 2 files changed +16
-18
lines changed Expand file tree Collapse file tree 2 files changed +16
-18
lines changed Original file line number Diff line number Diff line change @@ -1498,9 +1498,9 @@ def collect_output(
14981498
14991499 def recursively_insert (j_dict : Any , key : Any , val : Any ) -> Any :
15001500 """Recursively insert a value into any dictionary."""
1501- if isinstance (j_dict , List ):
1501+ if isinstance (j_dict , MutableSequence ):
15021502 return [recursively_insert (x , key , val ) for x in j_dict ]
1503- if isinstance (j_dict , Dict ):
1503+ if isinstance (j_dict , MutableMapping ):
15041504 if j_dict .get ("class" ) == "File" :
15051505 j_dict [key ] = val
15061506 else :
Original file line number Diff line number Diff line change 1- import subprocess
2- import sys
31from pathlib import Path
2+ import pytest
3+ from .util import get_data , get_main_output
44
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 :
97 """A simple test for format tag fix for 2D output arrays."""
108
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 )
2018
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