Beispiel #1
0
def test_qastdout():
    run_async_to_stdout([SCRIPT_QA, 'simple'])
    qa_dict = {
               'Simple question:': 'simple answer',
               }
    ec, output = run_qastdout([SCRIPT_QA, 'simple'], qa=qa_dict)
    return ec, output
Beispiel #2
0
def test_qastdout():
    run_async_to_stdout([SCRIPT_QA, 'simple'])
    qa_dict = {
        'Simple question:': 'simple answer',
    }
    ec, output = run_qastdout([SCRIPT_QA, 'simple'], qa=qa_dict)
    return ec, output
Beispiel #3
0
 def test_async_stdout_glob(self):
     self.mock_stdout(True)
     ec, output = run_async_to_stdout("/bin/echo ok")
     self.assertEqual(ec, 0)
     self.assertEqual(output, "ok\n",
                      "returned run_async_to_stdout output is as expected")
     self.assertEqual(sys.stdout.getvalue(), output,
                      "returned output is send to stdout")
Beispiel #4
0
 def main_runfunc(cmd):
     """The function that will run mpirun"""
     if self.options.output is not None:
         return run_to_file(cmd, filename=self.options.output)
     else:
         return run_async_to_stdout(cmd)
Beispiel #5
0
 def main_runfunc(cmd):
     if self.options.output is not None:
         return run_to_file(cmd, filename=self.options.output)
     else:
         return run_async_to_stdout(cmd)
Beispiel #6
0
 def main_runfunc(cmd):
     if self.options.output is not None:
         return run_to_file(cmd, filename=self.options.output)
     else:
         return run_async_to_stdout(cmd)