Skip to content

Commit eb7b894

Browse files
Ryan CaliRyan Cali
authored andcommitted
Removed 'mrcat' call from test_task.py and replaced with 'less'
1 parent 2624942 commit eb7b894

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

pydra/engine/tests/test_task.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1044,15 +1044,20 @@ def test_audit_shellcommandtask(tmpdir):
10441044

10451045

10461046
def test_audit_shellcommandtask_version(tmpdir):
1047-
cmd = "mrcat"
1047+
import subprocess as sp
1048+
version_cmd = (sp.run("less --version", shell=True,
1049+
stdout=sp.PIPE).stdout.decode("utf-8"))
1050+
version_cmd = version_cmd.splitlines()[0]
1051+
cmd = "less"
10481052
shelly = ShellCommandTask(
10491053
name="shelly",
10501054
executable=cmd,
1055+
args="test.txt",
10511056
audit_flags=AuditFlag.PROV,
10521057
messengers=FileMessenger(),
10531058
)
10541059

1055-
import subprocess as sp
1060+
10561061
import glob
10571062

10581063
shelly.cache_dir = tmpdir
@@ -1064,7 +1069,7 @@ def test_audit_shellcommandtask_version(tmpdir):
10641069
with open(file, "r") as f:
10651070
data = json.load(f)
10661071
if "AssociatedWith" in data:
1067-
if "== mrcat 3.0.3 ==" in data["AssociatedWith"]:
1072+
if version_cmd in data["AssociatedWith"]:
10681073
version_content.append(True)
10691074

10701075
assert any(version_content)

0 commit comments

Comments
 (0)