diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2009-04-28 22:54:30 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2009-04-28 22:54:30 -0400 |
commit | a273422d990e38934a067c88e2d8c94a74251a6a (patch) | |
tree | c4571c6ba8b165fdbdb63ab4cb0f4d134ac30989 | |
parent | 131e1d20bd9b23a5fc6094bf787a8facd2af6bab (diff) | |
download | python-coveragepy-git-a273422d990e38934a067c88e2d8c94a74251a6a.tar.gz |
Reduce line lengths.
-rw-r--r-- | test/test_cmdline.py | 50 |
1 files changed, 37 insertions, 13 deletions
diff --git a/test/test_cmdline.py b/test/test_cmdline.py index 8da78efe..85166040 100644 --- a/test/test_cmdline.py +++ b/test/test_cmdline.py @@ -8,6 +8,8 @@ from coveragetest import CoverageTest class CmdLineTest(CoverageTest): + """Tests of command-line processing for coverage.py.""" + def help_fn(self, error=None): raise Exception(error or "__doc__") @@ -16,27 +18,49 @@ class CmdLineTest(CoverageTest): def testHelp(self): self.assertRaisesMsg(Exception, "__doc__", self.command_line, ['-h']) - self.assertRaisesMsg(Exception, "__doc__", self.command_line, ['--help']) + self.assertRaisesMsg(Exception, "__doc__", self.command_line, + ['--help']) def testUnknownOption(self): - self.assertRaisesMsg(Exception, "option -z not recognized", self.command_line, ['-z']) + self.assertRaisesMsg(Exception, "option -z not recognized", + self.command_line, ['-z']) def testBadActionCombinations(self): - self.assertRaisesMsg(Exception, "You can't specify the 'erase' and 'annotate' options at the same time.", self.command_line, ['-e', '-a']) - self.assertRaisesMsg(Exception, "You can't specify the 'erase' and 'report' options at the same time.", self.command_line, ['-e', '-r']) - self.assertRaisesMsg(Exception, "You can't specify the 'erase' and 'html' options at the same time.", self.command_line, ['-e', '-b']) - self.assertRaisesMsg(Exception, "You can't specify the 'erase' and 'combine' options at the same time.", self.command_line, ['-e', '-c']) - self.assertRaisesMsg(Exception, "You can't specify the 'execute' and 'annotate' options at the same time.", self.command_line, ['-x', '-a']) - self.assertRaisesMsg(Exception, "You can't specify the 'execute' and 'report' options at the same time.", self.command_line, ['-x', '-r']) - self.assertRaisesMsg(Exception, "You can't specify the 'execute' and 'html' options at the same time.", self.command_line, ['-x', '-b']) - self.assertRaisesMsg(Exception, "You can't specify the 'execute' and 'combine' options at the same time.", self.command_line, ['-x', '-c']) + self.assertRaisesMsg(Exception, + "You can't specify the 'erase' and 'annotate' " + "options at the same time.", self.command_line, ['-e', '-a']) + self.assertRaisesMsg(Exception, + "You can't specify the 'erase' and 'report' " + "options at the same time.", self.command_line, ['-e', '-r']) + self.assertRaisesMsg(Exception, + "You can't specify the 'erase' and 'html' " + "options at the same time.", self.command_line, ['-e', '-b']) + self.assertRaisesMsg(Exception, + "You can't specify the 'erase' and 'combine' " + "options at the same time.", self.command_line, ['-e', '-c']) + self.assertRaisesMsg(Exception, + "You can't specify the 'execute' and 'annotate' " + "options at the same time.", self.command_line, ['-x', '-a']) + self.assertRaisesMsg(Exception, + "You can't specify the 'execute' and 'report' " + "options at the same time.", self.command_line, ['-x', '-r']) + self.assertRaisesMsg(Exception, + "You can't specify the 'execute' and 'html' " + "options at the same time.", self.command_line, ['-x', '-b']) + self.assertRaisesMsg(Exception, + "You can't specify the 'execute' and 'combine' " + "options at the same time.", self.command_line, ['-x', '-c']) def testNeedAction(self): - self.assertRaisesMsg(Exception, "You must specify at least one of -e, -x, -c, -r, -a, or -b.", self.command_line, ['-p']) + self.assertRaisesMsg(Exception, + "You must specify at least one of -e, -x, -c, -r, -a, or -b.", + self.command_line, ['-p']) def testArglessActions(self): - self.assertRaisesMsg(Exception, "Unexpected arguments: foo bar", self.command_line, ['-e', 'foo', 'bar']) - self.assertRaisesMsg(Exception, "Unexpected arguments: baz quux", self.command_line, ['-c', 'baz', 'quux']) + self.assertRaisesMsg(Exception, "Unexpected arguments: foo bar", + self.command_line, ['-e', 'foo', 'bar']) + self.assertRaisesMsg(Exception, "Unexpected arguments: baz quux", + self.command_line, ['-c', 'baz', 'quux']) if __name__ == '__main__': |