diff --git a/tests/test_commands.py b/tests/test_commands.py index 7cd19b29ae0..ae8c3813664 100644 --- a/tests/test_commands.py +++ b/tests/test_commands.py @@ -915,3 +915,17 @@ def start_requests(self): args = ['-o', 'example1.json', '-O', 'example2.json'] log = self.get_log(spider_code, args=args) self.assertIn("error: Please use only one of -o/--output and -O/--overwrite-output", log) + + +class HelpMessageTest(CommandTest): + + def setUp(self): + super().setUp() + self.commands = ["parse", "startproject", "view", "crawl", "edit", + "list", "fetch", "settings", "shell", "runspider", + "version", "genspider", "check", "bench"] + + def test_help_messages(self): + for command in self.commands: + _, out, _ = self.proc(command, "-h") + self.assertIn("Usage", out)