summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2009-10-25 16:45:55 -0400
committerNed Batchelder <ned@nedbatchelder.com>2009-10-25 16:45:55 -0400
commit14f0e02cb45551e95d3c03f6589813ce873f1281 (patch)
tree385df24ef910c6156b9635314f651296273b4d28
parent94b231f7b6175a38e97ff2555a4553bfa0b58389 (diff)
downloadpython-coveragepy-git-14f0e02cb45551e95d3c03f6589813ce873f1281.tar.gz
Pylint is a stern taskmaster
-rw-r--r--coverage/parser.py4
-rw-r--r--test/covmodzip1.py2
-rw-r--r--test/test_coverage.py3
-rw-r--r--test/try_execfile.py1
4 files changed, 7 insertions, 3 deletions
diff --git a/coverage/parser.py b/coverage/parser.py
index 433cb66c..29144859 100644
--- a/coverage/parser.py
+++ b/coverage/parser.py
@@ -26,7 +26,9 @@ class CodeParser(object):
sourcef.close()
except IOError:
_, err, _ = sys.exc_info()
- raise NoSource("No source for code: %r: %s" % (self.filename, err))
+ raise NoSource(
+ "No source for code: %r: %s" % (self.filename, err)
+ )
self.text = self.text.replace('\r\n', '\n')
self.exclude = exclude
diff --git a/test/covmodzip1.py b/test/covmodzip1.py
index c35688a8..3ec4cdc4 100644
--- a/test/covmodzip1.py
+++ b/test/covmodzip1.py
@@ -1,3 +1,3 @@
-# covmodzip.py: for putting into a zip file.
+"""covmodzip.py: for putting into a zip file."""
j = 1
j += 1
diff --git a/test/test_coverage.py b/test/test_coverage.py
index 16c0e069..7d6df250 100644
--- a/test/test_coverage.py
+++ b/test/test_coverage.py
@@ -1737,7 +1737,8 @@ class ProcessTest(CoverageTest):
self.assert_matches(out, "No source for code: '.*fleeting.py'")
self.assert_("Traceback" not in out)
- # It happens that the code paths are different for *.py and other files.
+ # It happens that the code paths are different for *.py and other
+ # files, so try again with no extension.
self.make_file("fleeting", """\
s = 'goodbye, cruel world!'
""")
diff --git a/test/try_execfile.py b/test/try_execfile.py
index 9a8804a0..d7ea4398 100644
--- a/test/try_execfile.py
+++ b/test/try_execfile.py
@@ -7,6 +7,7 @@ DATA = "xyzzy"
import __main__
def my_function(a):
+ """A function to force execution of module-level values."""
return "my_fn(%r)" % a
FN_VAL = my_function("fooey")