Skip to content

Commit 0759ab1

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 175662f commit 0759ab1

File tree

1 file changed

+33
-23
lines changed

1 file changed

+33
-23
lines changed

pydra/engine/tests/test_task.py

Lines changed: 33 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,15 @@
1212
from ..task import AuditFlag, ShellCommandTask, DockerTask, SingularityTask
1313
from ...utils.messenger import FileMessenger, PrintMessenger, collect_messages
1414
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+
)
1624
from ..helpers import hash_file
1725

1826
no_win = pytest.mark.skipif(
@@ -1022,7 +1030,6 @@ def testfunc(a: int, b: float = 0.1) -> ty.NamedTuple("Output", [("out", float)]
10221030
if "AssociatedWith" in data:
10231031
assert None == data["AssociatedWith"]
10241032

1025-
10261033
# assert any(json_content)
10271034

10281035

@@ -1073,26 +1080,31 @@ def test_audit_shellcommandtask_file(tmpdir):
10731080
file_in = tmpdir / "test.txt"
10741081
test_file_hash = hash_file(file_in)
10751082
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+
)
10931100
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+
)
10961108
shelly.cache_dir = tmpdir
10971109
shelly()
10981110
message_path = tmpdir / shelly.checksum / "messages"
@@ -1106,8 +1118,6 @@ def test_audit_shellcommandtask_file(tmpdir):
11061118
assert test_file_hash == data["digest"]
11071119

11081120

1109-
1110-
11111121
def test_audit_shellcommandtask_version(tmpdir):
11121122
import subprocess as sp
11131123

0 commit comments

Comments
 (0)