Kill markdown-section's help and end-of-section mutants
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user