File tree Expand file tree Collapse file tree 2 files changed +19
-1
lines changed
Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -846,6 +846,23 @@ def test_true_if_test_passes(self):
846846 with self .temp_session () as session :
847847 builder .build (session = self .session )
848848
849+ def test_true_if_test_passes_with_args (self ):
850+ assert (os .path .exists (os .path .join (fixtures_dir , 'script_complete.sh' )))
851+ sconfig = kaptan .Kaptan (handler = 'yaml' )
852+ yaml = self .config_script_completes .format (
853+ fixtures_dir = fixtures_dir ,
854+ script_complete = os .path .join (fixtures_dir , 'script_complete.sh' ) + ' -v'
855+ )
856+
857+ sconfig = sconfig .import_config (yaml ).get ()
858+ sconfig = config .expand (sconfig )
859+ sconfig = config .trickle (sconfig )
860+
861+ builder = WorkspaceBuilder (sconf = sconfig )
862+
863+ with self .temp_session () as session :
864+ builder .build (session = self .session )
865+
849866
850867def suite ():
851868 suite = unittest .TestSuite ()
Original file line number Diff line number Diff line change 1414import re
1515import os
1616import sys
17+ import shlex
1718import logging
1819
1920from distutils .version import StrictVersion
@@ -31,7 +32,7 @@ def run_before_script(script_file):
3132 """Function to wrap try/except for subprocess.check_call()."""
3233 try :
3334 proc = subprocess .Popen (
34- script_file ,
35+ shlex . split ( script_file ) ,
3536 stderr = subprocess .PIPE
3637 )
3738 proc .wait ()
You can’t perform that action at this time.
0 commit comments