def test_main_help(self):
"""Test that help returns True and get_help's output matches the expected length."""
sys.argv = ["ec2rl", "help"]
with contextlib.redirect_stdout(self.output):
self.assertTrue(self.ec2rl.help())
self.assertTrue(self.output.getvalue().startswith("ec2rl: A framework for executing diagnostic and troublesh"))
self.assertTrue(self.output.getvalue().endswith("- enables debug level logging\n\n"))
self.assertEqual(len(self.output.getvalue()), 8438)
评论列表
文章目录