@@ -770,7 +770,7 @@ def test_shell_cmd_inputs_template_1():
770
770
)
771
771
# outA has argstr in the metadata fields, so it's a part of the command line
772
772
# the full path will be use din the command line
773
- assert shelly .cmdline == f"executable inpA -o { str ( shelly .output_dir / 'inpA_out' ) } "
773
+ assert shelly .cmdline == f"executable inpA -o { shelly .output_dir / 'inpA_out' } "
774
774
# checking if outA in the output fields
775
775
assert shelly .output_names == ["return_code" , "stdout" , "stderr" , "outA" ]
776
776
@@ -922,7 +922,7 @@ def test_shell_cmd_inputs_template_3():
922
922
# using syntax from the outAB field
923
923
assert (
924
924
shelly .cmdline
925
- == f"executable inpA inpB -o { str ( shelly .output_dir / 'inpA_out' ) } { str (shelly .output_dir / 'inpB_out' )} "
925
+ == f"executable inpA inpB -o { shelly .output_dir / 'inpA_out' } { str (shelly .output_dir / 'inpB_out' )} "
926
926
)
927
927
# checking if outA and outB in the output fields (outAB should not be)
928
928
assert shelly .output_names == ["return_code" , "stdout" , "stderr" , "outA" , "outB" ]
@@ -1002,7 +1002,7 @@ def test_shell_cmd_inputs_template_3a():
1002
1002
# using syntax from the outAB field
1003
1003
assert (
1004
1004
shelly .cmdline
1005
- == f"executable inpA inpB -o { str ( shelly .output_dir / 'inpA_out' ) } { str (shelly .output_dir / 'inpB_out' )} "
1005
+ == f"executable inpA inpB -o { shelly .output_dir / 'inpA_out' } { str (shelly .output_dir / 'inpB_out' )} "
1006
1006
)
1007
1007
# checking if outA and outB in the output fields (outAB should not be)
1008
1008
assert shelly .output_names == ["return_code" , "stdout" , "stderr" , "outA" , "outB" ]
@@ -1076,7 +1076,7 @@ def test_shell_cmd_inputs_template_4():
1076
1076
executable = "executable" , input_spec = my_input_spec , inpA = "inpA"
1077
1077
)
1078
1078
# inpB is not provided so outB not in the command line
1079
- assert shelly .cmdline == f"executable inpA -o { str ( shelly .output_dir / 'inpA_out' ) } "
1079
+ assert shelly .cmdline == f"executable inpA -o { shelly .output_dir / 'inpA_out' } "
1080
1080
assert shelly .output_names == ["return_code" , "stdout" , "stderr" , "outA" , "outB" ]
1081
1081
1082
1082
@@ -1151,7 +1151,7 @@ def test_shell_cmd_inputs_template_6():
1151
1151
shelly = ShellCommandTask (
1152
1152
executable = "executable" , input_spec = my_input_spec , inpA = "inpA"
1153
1153
)
1154
- assert shelly .cmdline == f"executable inpA -o { str ( shelly .output_dir / 'inpA_out' ) } "
1154
+ assert shelly .cmdline == f"executable inpA -o { shelly .output_dir / 'inpA_out' } "
1155
1155
1156
1156
# a string is provided for outA, so this should be used as the outA value
1157
1157
shelly = ShellCommandTask (
@@ -1163,7 +1163,7 @@ def test_shell_cmd_inputs_template_6():
1163
1163
shelly = ShellCommandTask (
1164
1164
executable = "executable" , input_spec = my_input_spec , inpA = "inpA" , outA = True
1165
1165
)
1166
- assert shelly .cmdline == f"executable inpA -o { str ( shelly .output_dir / 'inpA_out' ) } "
1166
+ assert shelly .cmdline == f"executable inpA -o { shelly .output_dir / 'inpA_out' } "
1167
1167
1168
1168
# False is provided for outA, so the outA shouldn't be used
1169
1169
shelly = ShellCommandTask (
@@ -1225,7 +1225,7 @@ def test_shell_cmd_inputs_template_6a():
1225
1225
shelly = ShellCommandTask (
1226
1226
executable = "executable" , input_spec = my_input_spec , inpA = "inpA" , outA = True
1227
1227
)
1228
- assert shelly .cmdline == f"executable inpA -o { str ( shelly .output_dir / 'inpA_out' ) } "
1228
+ assert shelly .cmdline == f"executable inpA -o { shelly .output_dir / 'inpA_out' } "
1229
1229
1230
1230
# False is provided for outA, so the outA shouldn't be used
1231
1231
shelly = ShellCommandTask (
@@ -1278,7 +1278,7 @@ def test_shell_cmd_inputs_template_7(tmpdir):
1278
1278
# outA should be formatted in a way that that .txt goes to the end
1279
1279
assert (
1280
1280
shelly .cmdline
1281
- == f"executable { tmpdir .join ('a_file.txt' )} { str ( shelly .output_dir / 'a_file_out.txt' ) } "
1281
+ == f"executable { tmpdir .join ('a_file.txt' )} { shelly .output_dir / 'a_file_out.txt' } "
1282
1282
)
1283
1283
1284
1284
@@ -1327,7 +1327,7 @@ def test_shell_cmd_inputs_template_7a(tmpdir):
1327
1327
# outA should be formatted in a way that that .txt goes to the end
1328
1328
assert (
1329
1329
shelly .cmdline
1330
- == f"executable { tmpdir .join ('a_file.txt' )} { str ( shelly .output_dir / 'a_file_out.txt' ) } "
1330
+ == f"executable { tmpdir .join ('a_file.txt' )} { shelly .output_dir / 'a_file_out.txt' } "
1331
1331
)
1332
1332
1333
1333
@@ -1376,7 +1376,7 @@ def test_shell_cmd_inputs_template_7b(tmpdir):
1376
1376
# outA should be formatted in a way that that .txt goes to the end
1377
1377
assert (
1378
1378
shelly .cmdline
1379
- == f"executable { tmpdir .join ('a_file.txt' )} { str ( shelly .output_dir / 'a_file_out' ) } "
1379
+ == f"executable { tmpdir .join ('a_file.txt' )} { shelly .output_dir / 'a_file_out' } "
1380
1380
)
1381
1381
1382
1382
@@ -1422,7 +1422,7 @@ def test_shell_cmd_inputs_template_8(tmpdir):
1422
1422
# outA should be formatted in a way that inpA extension is removed and the template extension is used
1423
1423
assert (
1424
1424
shelly .cmdline
1425
- == f"executable { tmpdir .join ('a_file.t' )} { str ( shelly .output_dir / 'a_file_out.txt' ) } "
1425
+ == f"executable { tmpdir .join ('a_file.t' )} { shelly .output_dir / 'a_file_out.txt' } "
1426
1426
)
1427
1427
1428
1428
@@ -1482,7 +1482,7 @@ def test_shell_cmd_inputs_template_9(tmpdir):
1482
1482
1483
1483
assert (
1484
1484
shelly .cmdline
1485
- == f"executable { tmpdir .join ('inpA.t' )} -i 3 -o { str ( shelly .output_dir / 'inpA_3_out.txt' ) } "
1485
+ == f"executable { tmpdir .join ('inpA.t' )} -i 3 -o { shelly .output_dir / 'inpA_3_out.txt' } "
1486
1486
)
1487
1487
# checking if outA in the output fields
1488
1488
assert shelly .output_names == ["return_code" , "stdout" , "stderr" , "outA" ]
@@ -1544,7 +1544,7 @@ def test_shell_cmd_inputs_template_9a(tmpdir):
1544
1544
1545
1545
assert (
1546
1546
shelly .cmdline
1547
- == f"executable { tmpdir .join ('inpA.t' )} -i hola -o { str ( shelly .output_dir / 'inpA_hola_out.txt' ) } "
1547
+ == f"executable { tmpdir .join ('inpA.t' )} -i hola -o { shelly .output_dir / 'inpA_hola_out.txt' } "
1548
1548
)
1549
1549
# checking if outA in the output fields
1550
1550
assert shelly .output_names == ["return_code" , "stdout" , "stderr" , "outA" ]
@@ -1714,9 +1714,7 @@ def test_shell_cmd_inputs_template_10():
1714
1714
)
1715
1715
# outA has argstr in the metadata fields, so it's a part of the command line
1716
1716
# the full path will be use din the command line
1717
- assert (
1718
- shelly .cmdline == f"executable 3.3 -o { str (shelly .output_dir / 'file_3.3_out' )} "
1719
- )
1717
+ assert shelly .cmdline == f"executable 3.3 -o { shelly .output_dir / 'file_3.3_out' } "
1720
1718
# checking if outA in the output fields
1721
1719
assert shelly .output_names == ["return_code" , "stdout" , "stderr" , "outA" ]
1722
1720
@@ -1817,7 +1815,7 @@ def template_fun(inputs):
1817
1815
executable = "executable" , input_spec = my_input_spec , inpA = "inpA"
1818
1816
)
1819
1817
1820
- assert shelly .cmdline == f"executable inpA -o { str ( shelly .output_dir / 'inpA_out' ) } "
1818
+ assert shelly .cmdline == f"executable inpA -o { shelly .output_dir / 'inpA_out' } "
1821
1819
1822
1820
1823
1821
def test_shell_cmd_inputs_template_function_2 ():
@@ -1880,7 +1878,7 @@ def template_fun(inputs):
1880
1878
inpB = 1 ,
1881
1879
)
1882
1880
1883
- assert shelly .cmdline == f"executable inpA -o { str ( shelly .output_dir / 'inpA_odd' ) } "
1881
+ assert shelly .cmdline == f"executable inpA -o { shelly .output_dir / 'inpA_odd' } "
1884
1882
1885
1883
1886
1884
def test_shell_cmd_inputs_template_1_st ():
@@ -1930,7 +1928,7 @@ def test_shell_cmd_inputs_template_1_st():
1930
1928
# assert len(cmdline_list) == 2
1931
1929
# for i in range(2):
1932
1930
# path_out = Path(shelly.output_dir[i]) / f"{inpA[i]}_out"
1933
- # assert cmdline_list[i] == f"executable {inpA[i]} -o {str( path_out) }"
1931
+ # assert cmdline_list[i] == f"executable {inpA[i]} -o {path_out}"
1934
1932
1935
1933
1936
1934
# TODO: after deciding how we use requires/templates
@@ -2129,7 +2127,7 @@ def test_shell_cmd_inputs_di(tmpdir, use_validator):
2129
2127
)
2130
2128
assert (
2131
2129
shelly .cmdline
2132
- == f"DenoiseImage -i { tmpdir .join ('a_file.ext' )} -s 1 -p 1 -r 2 -o [{ str ( shelly .output_dir / 'a_file_out.ext' ) } ]"
2130
+ == f"DenoiseImage -i { tmpdir .join ('a_file.ext' )} -s 1 -p 1 -r 2 -o [{ shelly .output_dir / 'a_file_out.ext' } ]"
2133
2131
)
2134
2132
2135
2133
# input file name, noiseImage is set to True, so template is used in the output
@@ -2141,7 +2139,7 @@ def test_shell_cmd_inputs_di(tmpdir, use_validator):
2141
2139
)
2142
2140
assert (
2143
2141
shelly .cmdline == f"DenoiseImage -i { tmpdir .join ('a_file.ext' )} -s 1 -p 1 -r 2 "
2144
- f"-o [{ str ( shelly .output_dir / 'a_file_out.ext' ) } , { str (shelly .output_dir / 'a_file_noise.ext' )} ]"
2142
+ f"-o [{ shelly .output_dir / 'a_file_out.ext' } , { str (shelly .output_dir / 'a_file_noise.ext' )} ]"
2145
2143
)
2146
2144
2147
2145
# input file name and help_short
@@ -2153,7 +2151,7 @@ def test_shell_cmd_inputs_di(tmpdir, use_validator):
2153
2151
)
2154
2152
assert (
2155
2153
shelly .cmdline
2156
- == f"DenoiseImage -i { tmpdir .join ('a_file.ext' )} -s 1 -p 1 -r 2 -h -o [{ str ( shelly .output_dir / 'a_file_out.ext' ) } ]"
2154
+ == f"DenoiseImage -i { tmpdir .join ('a_file.ext' )} -s 1 -p 1 -r 2 -h -o [{ shelly .output_dir / 'a_file_out.ext' } ]"
2157
2155
)
2158
2156
2159
2157
assert shelly .output_names == [
@@ -2173,7 +2171,7 @@ def test_shell_cmd_inputs_di(tmpdir, use_validator):
2173
2171
)
2174
2172
assert (
2175
2173
shelly .cmdline
2176
- == f"DenoiseImage -d 2 -i { tmpdir .join ('a_file.ext' )} -s 1 -p 1 -r 2 -o [{ str ( shelly .output_dir / 'a_file_out.ext' ) } ]"
2174
+ == f"DenoiseImage -d 2 -i { tmpdir .join ('a_file.ext' )} -s 1 -p 1 -r 2 -o [{ shelly .output_dir / 'a_file_out.ext' } ]"
2177
2175
)
2178
2176
2179
2177
# adding image_dimensionality that has allowed_values [2, 3, 4] and providing 5 - exception should be raised
0 commit comments