@@ -530,19 +530,20 @@ def test_print_dot(self):
530
530
self .assertEquals (main (["--print-dot" , get_data ('tests/wf/revsort.cwl' )]), 0 )
531
531
532
532
533
- class TestJsConsole (unittest .TestCase ):
533
+ class TestCmdLine (unittest .TestCase ):
534
534
def get_main_stderr (self , new_args ):
535
- cwltool_base = path .join (path .dirname (path .abspath (__name__ )), "cwltool" )
536
-
537
535
process = subprocess .Popen ([
538
- sys .executable ,
539
- "-m" ,
540
- "cwltool"
541
- ] + new_args , stdout = subprocess .PIPE , stderr = subprocess .PIPE )
536
+ sys .executable ,
537
+ "-m" ,
538
+ "cwltool"
539
+ ] + new_args , stdout = subprocess .PIPE , stderr = subprocess .PIPE )
542
540
543
541
stdout , stderr = process .communicate ()
544
542
return process .returncode , stderr .decode ()
545
543
544
+
545
+ class TestJsConsole (TestCmdLine ):
546
+
546
547
def test_js_console_cmd_line_tool (self ):
547
548
for test_file in ("js_output.cwl" , "js_output_workflow.cwl" ):
548
549
error_code , output = self .get_main_stderr (["--js-console" , "--no-container" ,
@@ -560,6 +561,15 @@ def test_no_js_console(self):
560
561
561
562
self .assertNotIn ("[log] Log message" , output )
562
563
self .assertNotIn ("[err] Error message" , output )
563
-
564
+
565
+
566
+ class TestCache (TestCmdLine ):
567
+ def test_wf_without_container (self ):
568
+ test_file = "hello-workflow.cwl"
569
+ error_code , output = self .get_main_stderr (["--cachedir" , "cache" ,
570
+ get_data ("tests/wf/" + test_file ), "--usermessage" , "hello" ])
571
+ self .assertEquals (error_code , 0 )
572
+
573
+
564
574
if __name__ == '__main__' :
565
575
unittest .main ()
0 commit comments