def test_main_help_subcommand(self):
"""Test help output for the 'run' subcommand."""
sys.argv = ["ec2rl", "help", "run"]
with contextlib.redirect_stdout(self.output):
self.assertTrue(self.ec2rl.help())
# Check that the length of the help message matches the expected value
self.assertEqual(len(self.output.getvalue()), 2541)
self.assertTrue(self.output.getvalue().startswith("run:\n SYNOPSIS:\n ec2rl run [--only-modules=MOD"))
self.assertTrue(self.output.getvalue().endswith("to run in parallel. The default is 10.\n\n\n"))
评论列表
文章目录