summaryrefslogtreecommitdiff
path: root/coverage
diff options
context:
space:
mode:
Diffstat (limited to 'coverage')
-rw-r--r--coverage/annotate.py6
-rw-r--r--coverage/control.py4
-rw-r--r--coverage/execfile.py6
3 files changed, 9 insertions, 7 deletions
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.