summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/backunittest.py9
-rw-r--r--test/test_files.py2
-rw-r--r--test/test_summary.py1
3 files changed, 7 insertions, 5 deletions
diff --git a/test/backunittest.py b/test/backunittest.py
index c1685e0c..7ec34f5c 100644
--- a/test/backunittest.py
+++ b/test/backunittest.py
@@ -66,11 +66,12 @@ class TestCase(unittest.TestCase):
self.assertEqual(set(s1), set(s2))
if _need('assertRegexpMatches'):
- def assertRegexpMatches(self, s, regex):
- """Assert that `s` matches `regex`."""
- m = re.search(regex, s)
+ def assertRegexpMatches(self, text, regex, msg=None):
+ """Assert that `text` matches `regex`."""
+ m = re.search(regex, text)
if not m:
- raise self.failureException("%r doesn't match %r" % (s, regex))
+ msg = msg or ("%r doesn't match %r" % (text, regex))
+ raise self.failureException(msg)
if _need('assertMultiLineEqual'):
def assertMultiLineEqual(self, first, second, msg=None):
diff --git a/test/test_files.py b/test/test_files.py
index 207274a2..5692699c 100644
--- a/test/test_files.py
+++ b/test/test_files.py
@@ -38,7 +38,7 @@ class FileLocatorTest(CoverageTest):
self.assertEqual(fl.relative_filename(a2), a2)
def test_filepath_contains_absolute_prefix_twice(self):
- # https://bitbucket.org/ned/coveragepy/issue/194/filelocatorrelative_filename-could-mangle
+ # https://bitbucket.org/ned/coveragepy/issue/194
# Build a path that has two pieces matching the absolute path prefix.
# Technically, this test doesn't do that on Windows, but drive
# letters make that impractical to acheive.
diff --git a/test/test_summary.py b/test/test_summary.py
index 08f7fa9e..fd5c1b66 100644
--- a/test/test_summary.py
+++ b/test/test_summary.py
@@ -135,6 +135,7 @@ class SummaryTest(CoverageTest):
self.make_file("mycode.py", "This isn't python at all!")
report = self.report_from_command("coverage -r mycode.py")
+ # pylint: disable=C0301
# Name Stmts Miss Cover
# ----------------------------
# mycode NotPython: Couldn't parse '/tmp/test_cover/63354509363/mycode.py' as Python source: 'invalid syntax' at line 1