File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -1044,15 +1044,20 @@ def test_audit_shellcommandtask(tmpdir):
10441044
10451045
10461046def 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 )
You can’t perform that action at this time.
0 commit comments