diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2012-11-10 15:19:09 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2012-11-10 15:19:09 -0500 |
commit | f52b43321aad4c8e50bafbfbe95f1e7e570b4b8d (patch) | |
tree | 78732b1d1d9a24a84b0424ad5cd355c05c6ca96b /test | |
parent | 5aa66708b1c35fc7ce6e234bfe7684325e327ce4 (diff) | |
download | python-coveragepy-git-f52b43321aad4c8e50bafbfbe95f1e7e570b4b8d.tar.gz |
Upgrading pylint means fixing more nits.
Diffstat (limited to 'test')
-rw-r--r-- | test/backtest.py | 2 | ||||
-rw-r--r-- | test/test_config.py | 5 | ||||
-rw-r--r-- | test/test_html.py | 2 | ||||
-rw-r--r-- | test/test_phystokens.py | 4 | ||||
-rw-r--r-- | test/test_summary.py | 4 |
5 files changed, 8 insertions, 9 deletions
diff --git a/test/backtest.py b/test/backtest.py index c54171d3..b17aa242 100644 --- a/test/backtest.py +++ b/test/backtest.py @@ -31,7 +31,7 @@ else: stderr=subprocess.STDOUT ) output, _ = proc.communicate() - status = proc.returncode + status = proc.returncode # pylint: disable=E1101 # Get the output, and canonicalize it to strings with newlines. if not isinstance(output, str): diff --git a/test/test_config.py b/test/test_config.py index 5b8714cb..19e37ab9 100644 --- a/test/test_config.py +++ b/test/test_config.py @@ -3,7 +3,6 @@ import os, sys import coverage -from coverage.backward import to_bytes from coverage.misc import CoverageException sys.path.insert(0, os.path.split(__file__)[0]) # Force relative import for Py3k @@ -162,7 +161,7 @@ class ConfigFileTest(CoverageTest): self.assertTrue(cov.config.parallel) self.assertEqual(cov.get_exclude_list(), - ["if 0:", "pragma:?\s+no cover", "another_tab"] + ["if 0:", r"pragma:?\s+no cover", "another_tab"] ) self.assertTrue(cov.config.ignore_errors) self.assertEqual(cov.config.include, ["a/", "b/"]) @@ -172,7 +171,7 @@ class ConfigFileTest(CoverageTest): self.assertEqual(cov.config.precision, 3) self.assertEqual(cov.config.partial_list, - ["pragma:?\s+no branch"] + [r"pragma:?\s+no branch"] ) self.assertEqual(cov.config.partial_always_list, ["if 0:", "while True:"] diff --git a/test/test_html.py b/test/test_html.py index 2b389c07..5e5f7ce3 100644 --- a/test/test_html.py +++ b/test/test_html.py @@ -176,7 +176,7 @@ class HtmlTest(CoverageTest): if sys.version_info[:2] != (3,1): def test_non_ascii_title_set_in_config_file(self): self.create_initial_files() - self.make_file(".coveragerc", + self.make_file(".coveragerc", "[html]\ntitle = «ταБЬℓσ» numbers" ) self.run_coverage() diff --git a/test/test_phystokens.py b/test/test_phystokens.py index 0e778510..d4e417e8 100644 --- a/test/test_phystokens.py +++ b/test/test_phystokens.py @@ -37,8 +37,8 @@ class PhysTokensTest(CoverageTest): # source_token_lines doesn't preserve trailing spaces, so trim all that # before comparing. source = source.replace('\r\n', '\n') - source = re.sub("(?m)[ \t]+$", "", source) - tokenized = re.sub("(?m)[ \t]+$", "", tokenized) + source = re.sub(r"(?m)[ \t]+$", "", source) + tokenized = re.sub(r"(?m)[ \t]+$", "", tokenized) self.assertMultiLineEqual(source, tokenized) def check_file_tokenization(self, fname): diff --git a/test/test_summary.py b/test/test_summary.py index fd5c1b66..fae91ba5 100644 --- a/test/test_summary.py +++ b/test/test_summary.py @@ -142,9 +142,9 @@ class SummaryTest(CoverageTest): last = self.last_line_squeezed(report) # The actual file name varies run to run. - last = re.sub("parse '.*mycode.py", "parse 'mycode.py", last) + last = re.sub(r"parse '.*mycode.py", "parse 'mycode.py", last) # The actual error message varies version to version - last = re.sub(": '.*' at", ": 'error' at", last) + last = re.sub(r": '.*' at", ": 'error' at", last) self.assertEqual(last, "mycode NotPython: " "Couldn't parse 'mycode.py' as Python source: " |