summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.pylintrc2
-rw-r--r--coverage/annotate.py6
-rw-r--r--coverage/control.py4
-rw-r--r--coverage/execfile.py6
-rw-r--r--test/coveragetest.py7
-rw-r--r--test/test_execfile.py3
6 files changed, 17 insertions, 11 deletions
diff --git a/.pylintrc b/.pylintrc
index 204237fa..51c909aa 100644
--- a/.pylintrc
+++ b/.pylintrc
@@ -285,7 +285,7 @@ int-import-graph=
[FORMAT]
# Maximum number of characters on a single line.
-max-line-length=80
+max-line-length=79
# Maximum number of lines in a module
max-module-lines=1000
diff --git a/coverage/annotate.py b/coverage/annotate.py
index c0c69800..b861a6f4 100644
--- a/coverage/annotate.py
+++ b/coverage/annotate.py
@@ -40,10 +40,10 @@ class AnnotateReporter(Reporter):
filename = cu.filename
source = open(filename, 'r')
if self.directory:
- dest_file = os.path.join(self.directory, cu.flat_rootname()) + ".py"
+ dest_file = os.path.join(self.directory, cu.flat_rootname())
+ dest_file += ".py,cover"
else:
- dest_file = filename
- dest_file += ",cover"
+ dest_file = filename + ",cover"
dest = open(dest_file, 'w')
lineno = 0
diff --git a/coverage/control.py b/coverage/control.py
index f5cee740..e3053e49 100644
--- a/coverage/control.py
+++ b/coverage/control.py
@@ -157,7 +157,9 @@ class coverage:
if line not in execed:
missing.append(line)
- return (statements, excluded, missing, format_lines(statements, missing))
+ return (
+ statements, excluded, missing, format_lines(statements, missing)
+ )
def report(self, morfs, show_missing=True, ignore_errors=False, file=None):
"""Write a summary report to `file`.
diff --git a/coverage/execfile.py b/coverage/execfile.py
index ae4c7036..c957949e 100644
--- a/coverage/execfile.py
+++ b/coverage/execfile.py
@@ -10,9 +10,9 @@ def run_python_file(filename, args):
`args` is the argument array to present as sys.argv.
"""
- # Most code that does this does it in a way that leaves __main__ or __file__
- # with the wrong values. Importing the code as __main__ gets all of this
- # right automatically.
+ # Most code that does this does it in a way that leaves __main__ or
+ # __file__ with the wrong values. Importing the code as __main__ gets all
+ # of this right automatically.
#
# One difference from python.exe: if I run foo.py from the command line, it
# always uses foo.py. With this code, it might find foo.pyc instead.
diff --git a/test/coveragetest.py b/test/coveragetest.py
index c96e32ca..e76a9910 100644
--- a/test/coveragetest.py
+++ b/test/coveragetest.py
@@ -14,7 +14,9 @@ import coverage
class Tee(object):
- """A file-like that writes to all the file-likes it was constructed with."""
+ """A file-like that writes to all the file-likes it was constructed with.
+
+ """
def __init__(self, *files):
self.files = files
@@ -178,7 +180,8 @@ class CoverageTest(unittest.TestCase):
else:
excName = str(excClass)
raise self.failureException(
- "Expected to raise %s, didn't get an exception at all" % excName
+ "Expected to raise %s, didn't get an exception at all" %
+ excName
)
def nice_file(self, *fparts):
diff --git a/test/test_execfile.py b/test/test_execfile.py
index 85000495..d46732d2 100644
--- a/test/test_execfile.py
+++ b/test/test_execfile.py
@@ -24,7 +24,8 @@ class RunTest(CoverageTest):
self.assertEqual(dunder_file, "try_execfile")
# It should have its correct module data.
- self.assertEqual(mod_globs['__doc__'], "Test file for run_python_file.")
+ self.assertEqual(mod_globs['__doc__'],
+ "Test file for run_python_file.")
self.assertEqual(mod_globs['DATA'], "xyzzy")
self.assertEqual(mod_globs['FN_VAL'], "my_fn('fooey')")