12
12
from ..task import AuditFlag , ShellCommandTask , DockerTask , SingularityTask
13
13
from ...utils .messenger import FileMessenger , PrintMessenger , collect_messages
14
14
from .utils import gen_basic_wf , use_validator , Submitter
15
- from ..specs import MultiInputObj , MultiOutputObj , SpecInfo , FunctionSpec , BaseSpec , ShellSpec , File
15
+ from ..specs import (
16
+ MultiInputObj ,
17
+ MultiOutputObj ,
18
+ SpecInfo ,
19
+ FunctionSpec ,
20
+ BaseSpec ,
21
+ ShellSpec ,
22
+ File ,
23
+ )
16
24
from ..helpers import hash_file
17
25
18
26
no_win = pytest .mark .skipif (
@@ -1022,7 +1030,6 @@ def testfunc(a: int, b: float = 0.1) -> ty.NamedTuple("Output", [("out", float)]
1022
1030
if "AssociatedWith" in data :
1023
1031
assert None == data ["AssociatedWith" ]
1024
1032
1025
-
1026
1033
# assert any(json_content)
1027
1034
1028
1035
@@ -1073,26 +1080,31 @@ def test_audit_shellcommandtask_file(tmpdir):
1073
1080
file_in = tmpdir / "test.txt"
1074
1081
test_file_hash = hash_file (file_in )
1075
1082
my_input_spec = SpecInfo (
1076
- name = ' Input' ,
1077
- fields = [
1078
- (
1079
- ' in_file' ,
1080
- attr .ib (
1081
- type = File ,
1082
- metadata = {
1083
- ' position' : 1 ,
1084
- ' argstr' : '' ,
1085
- ' help_string' : ' text' ,
1086
- ' mandatory' : True ,
1087
- },
1088
- ),
1089
- )
1090
- ],
1091
- bases = (ShellSpec ,),
1092
- )
1083
+ name = " Input" ,
1084
+ fields = [
1085
+ (
1086
+ " in_file" ,
1087
+ attr .ib (
1088
+ type = File ,
1089
+ metadata = {
1090
+ " position" : 1 ,
1091
+ " argstr" : "" ,
1092
+ " help_string" : " text" ,
1093
+ " mandatory" : True ,
1094
+ },
1095
+ ),
1096
+ )
1097
+ ],
1098
+ bases = (ShellSpec ,),
1099
+ )
1093
1100
shelly = ShellCommandTask (
1094
- name = 'shelly' , in_file = file_in , input_spec = my_input_spec , executable = cmd , audit_flags = AuditFlag .PROV , messengers = PrintMessenger ()
1095
- )
1101
+ name = "shelly" ,
1102
+ in_file = file_in ,
1103
+ input_spec = my_input_spec ,
1104
+ executable = cmd ,
1105
+ audit_flags = AuditFlag .PROV ,
1106
+ messengers = PrintMessenger (),
1107
+ )
1096
1108
shelly .cache_dir = tmpdir
1097
1109
shelly ()
1098
1110
message_path = tmpdir / shelly .checksum / "messages"
@@ -1106,8 +1118,6 @@ def test_audit_shellcommandtask_file(tmpdir):
1106
1118
assert test_file_hash == data ["digest" ]
1107
1119
1108
1120
1109
-
1110
-
1111
1121
def test_audit_shellcommandtask_version (tmpdir ):
1112
1122
import subprocess as sp
1113
1123
0 commit comments