Beispiel #1
0
 def test_run_rb_success_suppress_exitstatus_false(self):
     out = run_js(self.node_success_path, suppress_exit_status_call=False) # when command succeeds SystemExit is not raised
     self.assertEqual(b'success\n', out)
Beispiel #2
0
 def test_run_node_fail_suppress_stderr(self):
     out = run_js(self.node_fail_path, suppress_stderr=True)
     self.assertEqual(False, out)  # returns False
Beispiel #3
0
 def test_run_node_fail_suppress_exitstatus_false(self):
     with self.assertRaises(SystemExit):
         out = run_js(self.node_fail_path, suppress_exit_status_call=False) # when suppress_exit_status=True, Python script stopped prematurely
Beispiel #4
0
 def test_run_node_success(self):
     out = run_js(self.node_success_path)
     self.assertEqual(b'success\n', out)
Beispiel #5
0
 def test_run_node_success_suppress_stdout(self):
     out = run_js(self.node_success_path, suppress_stdout=True)
     self.assertEqual(b'success\n', out) # still returns a value, does not print to std out
Beispiel #6
0
 def test_run_rb_success_suppress_exitstatus_false(self):
     out = run_js(self.node_success_path,
                  suppress_exit_status_call=False
                  )  # when command succeeds SystemExit is not raised
     self.assertEqual(b'success\n', out)
Beispiel #7
0
 def test_run_node_fail_suppress_exitstatus_false(self):
     with self.assertRaises(SystemExit):
         out = run_js(
             self.node_fail_path, suppress_exit_status_call=False
         )  # when suppress_exit_status=True, Python script stopped prematurely
Beispiel #8
0
 def test_run_node_fail_suppress_stderr(self):
     out = run_js(self.node_fail_path, suppress_stderr=True)
     self.assertEqual(False, out)  # returns False
Beispiel #9
0
 def test_run_node_success_suppress_stdout(self):
     out = run_js(self.node_success_path, suppress_stdout=True)
     self.assertEqual(
         b'success\n',
         out)  # still returns a value, does not print to std out
Beispiel #10
0
 def test_run_node_success(self):
     out = run_js(self.node_success_path)
     self.assertEqual(b'success\n', out)