Esempio n. 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)
Esempio n. 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
Esempio n. 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
Esempio n. 4
0
 def test_run_node_success(self):
     out = run_js(self.node_success_path)
     self.assertEqual(b'success\n', out)
Esempio n. 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
Esempio n. 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)
Esempio n. 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
Esempio n. 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
Esempio n. 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
Esempio n. 10
0
 def test_run_node_success(self):
     out = run_js(self.node_success_path)
     self.assertEqual(b'success\n', out)