コード例 #1
0
 def test_main(self):
     # should raise exception when no arguments
     with nostderr():  # don't clutter test results
         self.assertRaises(SystemExit, tkp.management.main)
コード例 #2
0
 def test_parse_no_arguments(self):
     # should raise error if no arguments
     parser = tkp.management.get_parser()
     with nostderr():  # don't clutter test results
         self.assertRaises(SystemExit,
                           parser.parse_args)