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