Commits

Ned Batchelder committed edce3f8

Some lint cleanup

Comments (0)

Files changed (3)

coverage/control.py

 from coverage.data import CoverageData
 from coverage.files import FileLocator
 from coverage.html import HtmlReporter
-from coverage.misc import format_lines, CoverageException, NoSource
+from coverage.misc import format_lines, NoSource
 from coverage.summary import SummaryReporter
 from coverage.xmlreport import XmlReporter
 

coverage/summary.py

             try:
                 analysis = self.coverage._analyze(cu)
                 nums = analysis.numbers
-                args = (cu.name, nums.n_statements, nums.n_run, nums.percent_covered)
+                args = (
+                    cu.name, nums.n_statements, nums.n_run,
+                    nums.percent_covered
+                    )
                 if self.show_missing:
                     args = args + (analysis.missing_formatted(),)
                 outfile.write(fmt_coverage % args)
 
         if total.n_files > 1:
             outfile.write(rule)
-            args = ("TOTAL", total.n_statements, total.n_run, total.percent_covered)
+            args = (
+                "TOTAL", total.n_statements, total.n_run, total.percent_covered
+                )
             if self.show_missing:
                 args = args + ("",)
             outfile.write(fmt_coverage % args)

test/test_coverage.py

         self.assert_("/test/modules/covmod1 " in report1)
         self.assert_("/test/zipmods.zip/covmodzip1 " in report1)
         self.assert_("mycode " in report1)
-        self.assertEqual(re.sub(r"\s+", " ", report1.split('\n')[-2]), "TOTAL 8 8 100%")
+        last_line = report1.split('\n')[-2]
+        self.assertEqual(re.sub(r"\s+", " ", last_line), "TOTAL 8 8 100%")
 
         for l in report1.split('\n'):
             if '/test/modules/covmod1' in l: