Skip to content

Commit

Permalink
CmdLineStdoutTest::test_cmd_help: test for at least 20 lines (#1013)
Browse files Browse the repository at this point in the history
The number of lines in the help output of a command depends on the terminal
size. The smaller the more line breaks.

The minimum number of lines for the current help message is 23. Currently we
are checking for at least 30 lines, yielding to failures on large terminals.

Reduce the number (currently 30) to 20 to have some leeway for the future.
  • Loading branch information
latricewilgus authored Jul 19, 2020
1 parent 40df2bf commit db4213b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/test_cmdline.py
Original file line number Diff line number Diff line change
Expand Up @@ -861,7 +861,7 @@ def test_cmd_help(self):
lines = out.splitlines()
self.assertIn("<pyfile>", lines[0])
self.assertIn("--timid", out)
self.assertGreater(len(lines), 30)
self.assertGreater(len(lines), 20)
self.assertEqual(lines[-1], "Full documentation is at {}".format(__url__))

def test_unknown_topic(self):
Expand Down

0 comments on commit db4213b

Please # to comment.