MCPcopy Create free account
hub / github.com/EasyIME/PIME / test_help

Method test_help

python/python3/tornado/test/options_test.py:73–83  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

71 self.assertTrue(self.called)
72
73 def test_help(self):
74 options = OptionParser()
75 try:
76 orig_stderr = sys.stderr
77 sys.stderr = StringIO()
78 with self.assertRaises(SystemExit):
79 options.parse_command_line(["main.py", "--help"])
80 usage = sys.stderr.getvalue()
81 finally:
82 sys.stderr = orig_stderr
83 self.assertIn("Usage:", usage)
84
85 def test_subcommand(self):
86 base_options = OptionParser()

Callers

nothing calls this directly

Calls 2

parse_command_lineMethod · 0.95
OptionParserClass · 0.90

Tested by

no test coverage detected