示例#1
0
 def test_main_2_1(self):
     with self.assertRaises(SystemExit) as err:
         with suppress_allout():
             test_module.parse_command_arguments([])
     self.assertEqual(err.exception.code, 2)
示例#2
0
 def test_main_2_6(self):
     with self.assertRaises(SystemExit) as err:
         with suppress_allout():
             test_module.parse_command_arguments(
                 ['localhost', 'key=value', '-k', '-t', '5'])
     self.assertEqual(err.exception.code, 2)
示例#3
0
 def test_main_0_2(self):
     with self.assertRaises(SystemExit) as err:
         with suppress_stdout():
             test_module.parse_command_arguments(['-h'])
     self.assertEqual(err.exception.code, 0)