Kill markdown-section's help and end-of-section mutants

This commit is contained in:
2026-11-17 12:09:15 +01:00
parent 7460454d93
commit fd9215ac9c
2 changed files with 8 additions and 7 deletions
@@ -118,10 +118,12 @@ class Main(unittest.TestCase):
with self.subTest(args):
self.assertEqual(self.run_main(*args), (2, "", "usage: markdown-section <file> <fragment>\n"))
def test_help_prints_the_usage_and_exits_0(self):
code, out, err = self.run_main("-h")
self.assertEqual((code, err), (0, ""))
self.assertTrue(out.startswith("Print one section of a markdown file"))
def test_help_prints_the_usage_and_exits_0_whatever_follows_it(self):
for args in (("-h",), ("--help",), ("--help", "x")):
with self.subTest(args):
code, out, err = self.run_main(*args)
self.assertEqual((code, err), (0, ""))
self.assertTrue(out.startswith("Print one section of a markdown file"))
class Launcher(unittest.TestCase):