Skip to content

Commit a273422

Browse files
committed
Reduce line lengths.
1 parent 131e1d2 commit a273422

File tree

1 file changed

+37
-13
lines changed

1 file changed

+37
-13
lines changed

test/test_cmdline.py

Lines changed: 37 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88

99

1010
class CmdLineTest(CoverageTest):
11+
"""Tests of command-line processing for coverage.py."""
12+
1113
def help_fn(self, error=None):
1214
raise Exception(error or "__doc__")
1315

@@ -16,27 +18,49 @@ def command_line(self, argv):
1618

1719
def testHelp(self):
1820
self.assertRaisesMsg(Exception, "__doc__", self.command_line, ['-h'])
19-
self.assertRaisesMsg(Exception, "__doc__", self.command_line, ['--help'])
21+
self.assertRaisesMsg(Exception, "__doc__", self.command_line,
22+
['--help'])
2023

2124
def testUnknownOption(self):
22-
self.assertRaisesMsg(Exception, "option -z not recognized", self.command_line, ['-z'])
25+
self.assertRaisesMsg(Exception, "option -z not recognized",
26+
self.command_line, ['-z'])
2327

2428
def testBadActionCombinations(self):
25-
self.assertRaisesMsg(Exception, "You can't specify the 'erase' and 'annotate' options at the same time.", self.command_line, ['-e', '-a'])
26-
self.assertRaisesMsg(Exception, "You can't specify the 'erase' and 'report' options at the same time.", self.command_line, ['-e', '-r'])
27-
self.assertRaisesMsg(Exception, "You can't specify the 'erase' and 'html' options at the same time.", self.command_line, ['-e', '-b'])
28-
self.assertRaisesMsg(Exception, "You can't specify the 'erase' and 'combine' options at the same time.", self.command_line, ['-e', '-c'])
29-
self.assertRaisesMsg(Exception, "You can't specify the 'execute' and 'annotate' options at the same time.", self.command_line, ['-x', '-a'])
30-
self.assertRaisesMsg(Exception, "You can't specify the 'execute' and 'report' options at the same time.", self.command_line, ['-x', '-r'])
31-
self.assertRaisesMsg(Exception, "You can't specify the 'execute' and 'html' options at the same time.", self.command_line, ['-x', '-b'])
32-
self.assertRaisesMsg(Exception, "You can't specify the 'execute' and 'combine' options at the same time.", self.command_line, ['-x', '-c'])
29+
self.assertRaisesMsg(Exception,
30+
"You can't specify the 'erase' and 'annotate' "
31+
"options at the same time.", self.command_line, ['-e', '-a'])
32+
self.assertRaisesMsg(Exception,
33+
"You can't specify the 'erase' and 'report' "
34+
"options at the same time.", self.command_line, ['-e', '-r'])
35+
self.assertRaisesMsg(Exception,
36+
"You can't specify the 'erase' and 'html' "
37+
"options at the same time.", self.command_line, ['-e', '-b'])
38+
self.assertRaisesMsg(Exception,
39+
"You can't specify the 'erase' and 'combine' "
40+
"options at the same time.", self.command_line, ['-e', '-c'])
41+
self.assertRaisesMsg(Exception,
42+
"You can't specify the 'execute' and 'annotate' "
43+
"options at the same time.", self.command_line, ['-x', '-a'])
44+
self.assertRaisesMsg(Exception,
45+
"You can't specify the 'execute' and 'report' "
46+
"options at the same time.", self.command_line, ['-x', '-r'])
47+
self.assertRaisesMsg(Exception,
48+
"You can't specify the 'execute' and 'html' "
49+
"options at the same time.", self.command_line, ['-x', '-b'])
50+
self.assertRaisesMsg(Exception,
51+
"You can't specify the 'execute' and 'combine' "
52+
"options at the same time.", self.command_line, ['-x', '-c'])
3353

3454
def testNeedAction(self):
35-
self.assertRaisesMsg(Exception, "You must specify at least one of -e, -x, -c, -r, -a, or -b.", self.command_line, ['-p'])
55+
self.assertRaisesMsg(Exception,
56+
"You must specify at least one of -e, -x, -c, -r, -a, or -b.",
57+
self.command_line, ['-p'])
3658

3759
def testArglessActions(self):
38-
self.assertRaisesMsg(Exception, "Unexpected arguments: foo bar", self.command_line, ['-e', 'foo', 'bar'])
39-
self.assertRaisesMsg(Exception, "Unexpected arguments: baz quux", self.command_line, ['-c', 'baz', 'quux'])
60+
self.assertRaisesMsg(Exception, "Unexpected arguments: foo bar",
61+
self.command_line, ['-e', 'foo', 'bar'])
62+
self.assertRaisesMsg(Exception, "Unexpected arguments: baz quux",
63+
self.command_line, ['-c', 'baz', 'quux'])
4064

4165

4266
if __name__ == '__main__':

0 commit comments

Comments
 (0)