diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/backtest.py | 2 | ||||
-rw-r--r-- | tests/test_api.py | 6 | ||||
-rw-r--r-- | tests/test_cmdline.py | 2 | ||||
-rw-r--r-- | tests/test_codeunit.py | 2 | ||||
-rw-r--r-- | tests/test_farm.py | 3 | ||||
-rw-r--r-- | tests/test_process.py | 2 | ||||
-rw-r--r-- | tests/test_summary.py | 10 | ||||
-rw-r--r-- | tests/test_xml.py | 2 |
8 files changed, 15 insertions, 14 deletions
diff --git a/tests/backtest.py b/tests/backtest.py index 1b38cce1..574e6ac4 100644 --- a/tests/backtest.py +++ b/tests/backtest.py @@ -1,6 +1,6 @@ """Add things to old Pythons so I can pretend they are newer, for tests.""" -# pylint: disable=W0622 +# pylint: disable=redefined-builtin # (Redefining built-in blah) # The whole point of this file is to redefine built-ins, so shut up about it. diff --git a/tests/test_api.py b/tests/test_api.py index 31bfc57f..ca65d6de 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -448,7 +448,7 @@ class SourceOmitIncludeTest(OmitIncludeTestsMixin, CoverageTest): """ cov = coverage.coverage(**kwargs) cov.start() - import usepkgs # pragma: nested # pylint: disable=F0401,W0612 + import usepkgs # pragma: nested # pylint: disable=import-error,unused-variable cov.stop() # pragma: nested cov._harvest_data() # private! sshhh... summary = cov.data.summary() @@ -487,7 +487,7 @@ class ReportIncludeOmitTest(OmitIncludeTestsMixin, CoverageTest): """Try coverage.report().""" cov = coverage.coverage() cov.start() - import usepkgs # pragma: nested # pylint: disable=F0401,W0612 + import usepkgs # pragma: nested # pylint: disable=import-error,unused-variable cov.stop() # pragma: nested report = StringIO() cov.report(file=report, **kwargs) @@ -506,7 +506,7 @@ class XmlIncludeOmitTest(OmitIncludeTestsMixin, CoverageTest): """Try coverage.xml_report().""" cov = coverage.coverage() cov.start() - import usepkgs # pragma: nested # pylint: disable=F0401,W0612 + import usepkgs # pragma: nested # pylint: disable=import-error,unused-variable cov.stop() # pragma: nested cov.xml_report(outfile="-", **kwargs) return self.stdout() diff --git a/tests/test_cmdline.py b/tests/test_cmdline.py index 695c3bec..a2ec5c0a 100644 --- a/tests/test_cmdline.py +++ b/tests/test_cmdline.py @@ -153,7 +153,7 @@ class FakeCoverageForDebugData(object): """Fake coverage().data.has_arcs()""" return False - def summary(self, fullpath): # pylint: disable=W0613 + def summary(self, fullpath): # pylint: disable=unused-argument """Fake coverage().data.summary()""" return self._summary diff --git a/tests/test_codeunit.py b/tests/test_codeunit.py index fe82ea1c..49981264 100644 --- a/tests/test_codeunit.py +++ b/tests/test_codeunit.py @@ -7,7 +7,7 @@ from coverage.files import FileLocator from tests.coveragetest import CoverageTest -# pylint: disable=F0401 +# pylint: disable=import-error # Unable to import 'aa' (No module named aa) class CodeUnitTest(CoverageTest): diff --git a/tests/test_farm.py b/tests/test_farm.py index 9e369cf3..661c67b7 100644 --- a/tests/test_farm.py +++ b/tests/test_farm.py @@ -3,7 +3,8 @@ import difflib, filecmp, fnmatch, glob, os, re, shutil, sys from nose.plugins.skip import SkipTest -from tests.backtest import run_command, execfile # pylint: disable=W0622 +from tests.backtest import run_command +from tests.backtest import execfile # pylint: disable=redefined-builtin from coverage.control import _TEST_NAME_FILE diff --git a/tests/test_process.py b/tests/test_process.py index ac5c6e1b..4584e7d7 100644 --- a/tests/test_process.py +++ b/tests/test_process.py @@ -661,7 +661,7 @@ class ProcessStartupTest(CoverageTest): data_file = .mycovdata """) self.set_environ("COVERAGE_PROCESS_START", "coverage.ini") - import main # pylint: disable=F0401,W0612 + import main # pylint: disable=import-error,unused-variable with open("out.txt") as f: self.assertEqual(f.read(), "Hello, world!\n") diff --git a/tests/test_summary.py b/tests/test_summary.py index c8364ca5..9973b3d5 100644 --- a/tests/test_summary.py +++ b/tests/test_summary.py @@ -231,7 +231,7 @@ class SummaryTest(CoverageTest): self.make_file("mycode.py", "This isn't python at all!") report = self.report_from_command("coverage report mycode.py") - # pylint: disable=C0301 + # pylint: disable=line-too-long # Name Stmts Miss Cover # ---------------------------- # mycode NotPython: Couldn't parse '/tmp/test_cover/63354509363/mycode.py' as Python source: 'invalid syntax' at line 1 @@ -297,7 +297,7 @@ class SummaryTest(CoverageTest): """) cov = coverage.coverage(branch=True, source=["."]) cov.start() - import main # pragma: nested # pylint: disable=F0401,W0612 + import main # pragma: nested # pylint: disable=import-error,unused-variable cov.stop() # pragma: nested report = self.get_report(cov).splitlines() self.assertIn("mybranch 5 5 2 0 0%", report) @@ -306,7 +306,7 @@ class SummaryTest(CoverageTest): """A helper for the next few tests.""" cov = coverage.coverage() cov.start() - import TheCode # pragma: nested # pylint: disable=F0401,W0612 + import TheCode # pragma: nested # pylint: disable=import-error,unused-variable cov.stop() # pragma: nested return self.get_report(cov) @@ -339,7 +339,7 @@ class SummaryTest(CoverageTest): """) cov = coverage.coverage() cov.start() - import start # pragma: nested # pylint: disable=F0401,W0612 + import start # pragma: nested # pylint: disable=import-error,unused-variable cov.stop() # pragma: nested report = self.get_report(cov) @@ -369,7 +369,7 @@ class SummaryTest2(CoverageTest): # statements, not one statement. cov = coverage.coverage() cov.start() - import usepkgs # pragma: nested # pylint: disable=F0401,W0612 + import usepkgs # pragma: nested # pylint: disable=import-error,unused-variable cov.stop() # pragma: nested repout = StringIO() diff --git a/tests/test_xml.py b/tests/test_xml.py index 37ada3cb..3c7d2361 100644 --- a/tests/test_xml.py +++ b/tests/test_xml.py @@ -80,7 +80,7 @@ class XmlReportTest(CoverageTest): def test_filename_format_including_module(self): cov = self.run_doit() - import sub.doit # pylint: disable=F0401 + import sub.doit # pylint: disable=import-error cov.xml_report([sub.doit], outfile="-") xml = self.stdout() doit_line = re_line(xml, "class.*doit") |