コード例 #1
0
 def test_run_bad_command_output(self):
     with self.assertRaises(
             SystemExit
     ):  # raises SystemExit when suppress_exit_status_call = False
         self.assertEqual(
             False,
             run(self.bad_command, suppress_exit_status_call=False))
コード例 #2
0
ファイル: test_SHELL_c.py プロジェクト: chrisidefix/naked
 def test_run_missing_option(self):
     self.assertEqual(False, run(self.missing_option))
コード例 #3
0
ファイル: test_SHELL_c.py プロジェクト: chrisidefix/naked
 def test_run_bad_command_output(self):
     with self.assertRaises(SystemExit): # raises SystemExit when suppress_exit_status_call = False
         self.assertEqual(False, run(self.bad_command, suppress_exit_status_call=False))
コード例 #4
0
ファイル: test_SHELL_c.py プロジェクト: chrisidefix/naked
 def test_run_bad_command_output(self):
     test_string = run(self.bad_command)
     self.assertEqual(False, run(self.bad_command))
コード例 #5
0
ファイル: test_SHELL_c.py プロジェクト: chrisidefix/naked
 def test_run_bad_command(self):
     self.assertEqual(False, run(self.bad_command))
コード例 #6
0
ファイル: test_SHELL_c.py プロジェクト: chrisidefix/naked
 def test_run_good_command_suppress_stdout(self):
     self.assertEqual(b"test command\n", run(self.good_command, suppress_stdout=True)) # still receive return value when stout print suppressed
コード例 #7
0
ファイル: test_SHELL_c.py プロジェクト: chrisidefix/naked
 def test_run_good_command(self):
     self.assertEqual(b"test command\n", run(self.good_command))
コード例 #8
0
 def test_run_missing_option(self):
     self.assertEqual(False, run(self.missing_option))
コード例 #9
0
 def test_run_bad_command_output(self):
     test_string = run(self.bad_command)
     self.assertEqual(False, run(self.bad_command))
コード例 #10
0
 def test_run_bad_command(self):
     self.assertEqual(False, run(self.bad_command))
コード例 #11
0
 def test_run_good_command_suppress_stdout(self):
     self.assertEqual(
         b"test command\n", run(self.good_command, suppress_stdout=True)
     )  # still receive return value when stout print suppressed
コード例 #12
0
 def test_run_good_command(self):
     self.assertEqual(b"test command\n", run(self.good_command))