summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--coverage/__init__.py4
-rw-r--r--coverage/backunittest.py2
-rw-r--r--coverage/backward.py6
-rw-r--r--coverage/collector.py4
-rw-r--r--coverage/config.py2
-rw-r--r--coverage/control.py14
-rw-r--r--coverage/execfile.py1
-rw-r--r--coverage/misc.py24
-rw-r--r--coverage/parser.py4
-rw-r--r--coverage/plugin.py23
-rw-r--r--igor.py6
-rw-r--r--pylintrc10
-rw-r--r--setup.py6
-rw-r--r--tests/backtest.py4
-rw-r--r--tests/test_api.py6
-rw-r--r--tests/test_cmdline.py2
-rw-r--r--tests/test_codeunit.py2
-rw-r--r--tests/test_concurrency.py6
-rw-r--r--tests/test_farm.py3
-rw-r--r--tests/test_misc.py53
-rw-r--r--tests/test_plugins.py52
-rw-r--r--tests/test_process.py2
-rw-r--r--tests/test_summary.py11
-rw-r--r--tests/test_templite.py4
-rw-r--r--tests/test_xml.py2
25 files changed, 126 insertions, 127 deletions
diff --git a/coverage/__init__.py b/coverage/__init__.py
index 67dd6e8..3a52c1d 100644
--- a/coverage/__init__.py
+++ b/coverage/__init__.py
@@ -34,9 +34,9 @@ def _singleton_method(name):
called.
"""
- # Disable pylint msg W0612, because a bunch of variables look unused, but
+ # Disable pylint message, because a bunch of variables look unused, but
# they're accessed via locals().
- # pylint: disable=W0612
+ # pylint: disable=unused-variable
def wrapper(*args, **kwargs):
"""Singleton wrapper around a coverage method."""
diff --git a/coverage/backunittest.py b/coverage/backunittest.py
index b2b7ca2..648e74e 100644
--- a/coverage/backunittest.py
+++ b/coverage/backunittest.py
@@ -3,7 +3,7 @@
# Use unittest2 if it's available, otherwise unittest. This gives us
# backported features for 2.6.
try:
- import unittest2 as unittest # pylint: disable=F0401
+ import unittest2 as unittest
except ImportError:
import unittest
diff --git a/coverage/backward.py b/coverage/backward.py
index e839f6b..3372a8b 100644
--- a/coverage/backward.py
+++ b/coverage/backward.py
@@ -2,8 +2,6 @@
# This file does lots of tricky stuff, so disable a bunch of lintisms.
# pylint: disable=redefined-builtin
-# pylint: disable=import-error
-# pylint: disable=no-member
# pylint: disable=unused-import
# pylint: disable=no-name-in-module
@@ -50,7 +48,7 @@ else:
if sys.version_info >= (3, 0):
# Python 3.2 provides `tokenize.open`, the best way to open source files.
import tokenize
- open_python_source = tokenize.open # pylint: disable=E1101
+ open_python_source = tokenize.open
else:
def open_python_source(fname):
"""Open a source file the best way."""
@@ -153,7 +151,7 @@ def import_local_file(modname):
break
with open(modfile, 'r') as f:
- # pylint: disable=W0631
+ # pylint: disable=undefined-loop-variable
# (Using possibly undefined loop variable 'suff')
mod = imp.load_module(modname, f, modfile, suff)
diff --git a/coverage/collector.py b/coverage/collector.py
index 001bc3d..72a7b7f 100644
--- a/coverage/collector.py
+++ b/coverage/collector.py
@@ -7,7 +7,7 @@ from coverage.pytracer import PyTracer
try:
# Use the C extension code when we can, for speed.
- from coverage.tracer import CTracer # pylint: disable=F0401,E0611
+ from coverage.tracer import CTracer # pylint: disable=no-name-in-module
except ImportError:
# Couldn't import the C extension, maybe it isn't built.
if os.getenv('COVERAGE_TEST_TRACER') == 'c':
@@ -24,7 +24,7 @@ except ImportError:
CTracer = None
try:
- import __pypy__ # pylint: disable=import-error
+ import __pypy__
except ImportError:
__pypy__ = None
diff --git a/coverage/config.py b/coverage/config.py
index ac895f7..9598f74 100644
--- a/coverage/config.py
+++ b/coverage/config.py
@@ -7,7 +7,7 @@ from coverage.misc import CoverageException
# In py3, # ConfigParser was renamed to the more-standard configparser
try:
- import configparser # pylint: disable=F0401
+ import configparser
except ImportError:
import ConfigParser as configparser
diff --git a/coverage/control.py b/coverage/control.py
index 79df08d..6ab5b4e 100644
--- a/coverage/control.py
+++ b/coverage/control.py
@@ -9,12 +9,12 @@ from coverage.collector import Collector
from coverage.config import CoverageConfig
from coverage.data import CoverageData
from coverage.debug import DebugControl
-from coverage.plugin import CoveragePlugin, Plugins, overrides
+from coverage.plugin import CoveragePlugin, Plugins
from coverage.files import FileLocator, TreeMatcher, FnmatchMatcher
from coverage.files import PathAliases, find_python_files, prep_patterns
from coverage.html import HtmlReporter
from coverage.misc import CoverageException, bool_or_none, join_regex
-from coverage.misc import file_be_gone
+from coverage.misc import file_be_gone, overrides
from coverage.results import Analysis, Numbers
from coverage.summary import SummaryReporter
from coverage.xmlreport import XmlReporter
@@ -23,7 +23,7 @@ from coverage.xmlreport import XmlReporter
# Pypy has some unusual stuff in the "stdlib". Consider those locations
# when deciding where the stdlib is.
try:
- import _structseq # pylint: disable=F0401
+ import _structseq
except ImportError:
_structseq = None
@@ -731,8 +731,8 @@ class Coverage(object):
return Analysis(self, it)
def report(self, morfs=None, show_missing=True, ignore_errors=None,
- file=None, # pylint: disable=W0622
- omit=None, include=None, skip_covered=False
+ file=None, # pylint: disable=redefined-builtin
+ omit=None, include=None, skip_covered=False,
):
"""Write a summary report to `file`.
@@ -743,15 +743,13 @@ class Coverage(object):
match those patterns will be included in the report. Modules matching
`omit` will not be included in the report.
- `skip_covered` if True report won't print files with 100% coverage.
-
Returns a float, the total percentage covered.
"""
self._harvest_data()
self.config.from_args(
ignore_errors=ignore_errors, omit=omit, include=include,
- show_missing=show_missing, skip_covered=skip_covered
+ show_missing=show_missing, skip_covered=skip_covered,
)
reporter = SummaryReporter(self, self.config)
return reporter.report(morfs, outfile=file)
diff --git a/coverage/execfile.py b/coverage/execfile.py
index 82cc221..e7e2071 100644
--- a/coverage/execfile.py
+++ b/coverage/execfile.py
@@ -14,7 +14,6 @@ if importlib_util_find_spec:
Returns the file path of the module, and the name of the enclosing
package.
"""
- # pylint: disable=no-member
try:
spec = importlib_util_find_spec(modulename)
except ImportError as err:
diff --git a/coverage/misc.py b/coverage/misc.py
index f9a30bc..f0e043b 100644
--- a/coverage/misc.py
+++ b/coverage/misc.py
@@ -4,6 +4,7 @@ import errno
import hashlib
import inspect
import os
+import sys
from coverage.backward import string_class, to_bytes
@@ -135,6 +136,29 @@ class Hasher(object):
return self.md5.hexdigest()
+def overrides(obj, method_name, base_class):
+ """Does `obj` override the `method_name` it got from `base_class`?
+
+ Determine if `obj` implements the method called `method_name`, which it
+ inherited from `base_class`.
+
+ Returns a boolean.
+
+ """
+ klass = obj.__class__
+ klass_func = getattr(klass, method_name)
+ base_func = getattr(base_class, method_name)
+
+ # Python 2/3 compatibility: Python 2 returns an instancemethod object, the
+ # function is the .im_func attribute. Python 3 returns a plain function
+ # object already.
+ if sys.version_info < (3, 0):
+ klass_func = klass_func.im_func
+ base_func = base_func.im_func
+
+ return klass_func is not base_func
+
+
class CoverageException(Exception):
"""An exception specific to Coverage."""
pass
diff --git a/coverage/parser.py b/coverage/parser.py
index e7b9c02..8b9cc1e 100644
--- a/coverage/parser.py
+++ b/coverage/parser.py
@@ -3,7 +3,7 @@
import collections, dis, re, token, tokenize
from coverage.backward import StringIO
-from coverage.backward import range # pylint: disable=W0622
+from coverage.backward import range # pylint: disable=redefined-builtin
from coverage.backward import bytes_to_ints, open_python_source
from coverage.bytecode import ByteCodes, CodeObjects
from coverage.misc import nice_pair, expensive, join_regex
@@ -545,7 +545,7 @@ class ByteParser(object):
chunks.append(chunk)
# Give all the chunks a length.
- chunks[-1].length = bc.next_offset - chunks[-1].byte # pylint: disable=W0631,C0301
+ chunks[-1].length = bc.next_offset - chunks[-1].byte
for i in range(len(chunks)-1):
chunks[i].length = chunks[i+1].byte - chunks[i].byte
diff --git a/coverage/plugin.py b/coverage/plugin.py
index 3d41aab..1e6e235 100644
--- a/coverage/plugin.py
+++ b/coverage/plugin.py
@@ -129,26 +129,3 @@ class Plugins(object):
def get(self, module):
return self.names[module]
-
-
-def overrides(obj, method_name, base_class):
- """Does `obj` override the `method_name` it got from `base_class`?
-
- Determine if `obj` implements the method called `method_name`, which it
- inherited from `base_class`.
-
- Returns a boolean.
-
- """
- klass = obj.__class__
- klass_func = getattr(klass, method_name)
- base_func = getattr(base_class, method_name)
-
- # Python 2/3 compatibility: Python 2 returns an instancemethod object, the
- # function is the .im_func attribute. Python 3 returns a plain function
- # object already.
- if sys.version_info < (3, 0):
- klass_func = klass_func.im_func
- base_func = base_func.im_func
-
- return klass_func is not base_func
diff --git a/igor.py b/igor.py
index 4df94cf..3a1b6e2 100644
--- a/igor.py
+++ b/igor.py
@@ -99,7 +99,7 @@ def run_tests_with_coverage(tracer, *nose_args):
if getattr(mod, '__file__', "??").startswith(covdir):
covmods[name] = mod
del sys.modules[name]
- import coverage # don't warn about re-import: pylint: disable=W0404
+ import coverage # don't warn about re-import: pylint: disable=reimported
sys.modules.update(covmods)
# Run nosetests, with the arguments from our command line.
@@ -140,7 +140,7 @@ def do_zip_mods():
def do_install_egg():
"""Install the egg1 egg for tests."""
# I am pretty certain there are easier ways to install eggs...
- # pylint: disable=F0401,E0611,E1101
+ # pylint: disable=import-error,no-name-in-module
import distutils.core
cur_dir = os.getcwd()
os.chdir("tests/eggsrc")
@@ -223,7 +223,7 @@ def print_banner(label):
version = platform.python_version()
if '__pypy__' in sys.builtin_module_names:
- pypy_version = sys.pypy_version_info # pylint: disable=E1101
+ pypy_version = sys.pypy_version_info
version += " (pypy %s)" % ".".join(str(v) for v in pypy_version)
which_python = os.path.relpath(sys.executable)
diff --git a/pylintrc b/pylintrc
index c247fb7..15a3b4d 100644
--- a/pylintrc
+++ b/pylintrc
@@ -20,10 +20,10 @@ profile=no
# Add <file or directory> to the black list. It should be a base name, not a
# path. You may set this option multiple times.
-ignore=CVS
+ignore=
# Pickle collected data for later comparisons.
-persistent=yes
+persistent=no
# Set the cache size for astng objects.
cache-size=500
@@ -50,7 +50,9 @@ load-plugins=
#disable-msg-cat=
# Enable the message(s) with the given id(s).
-#enable-msg=
+enable=
+# I0021: Useless suppression
+ I0021
# Disable the message(s) with the given id(s).
disable=
@@ -75,6 +77,8 @@ disable=
# W0212: 86:Reporter.report_files: Access to a protected member _analyze of a client class
C0103,W0212
+msg-template={path}:{line}: {msg} ({symbol})
+
[REPORTS]
# set the output format. Available formats are text, parseable, colorized, msvs
diff --git a/setup.py b/setup.py
index 3f7afae..7139ce3 100644
--- a/setup.py
+++ b/setup.py
@@ -46,9 +46,9 @@ Topic :: Software Development :: Testing
import os, sys
from setuptools import setup
-from distutils.core import Extension # pylint: disable=E0611,F0401
-from distutils.command.build_ext import build_ext # pylint: disable=E0611,F0401,C0301
-from distutils import errors # pylint: disable=E0611,F0401
+from distutils.core import Extension # pylint: disable=no-name-in-module,import-error
+from distutils.command.build_ext import build_ext # pylint: disable=no-name-in-module
+from distutils import errors # pylint: disable=no-name-in-module
# Get or massage our metadata. We exec coverage/version.py so we can avoid
# importing the product code into setup.py.
diff --git a/tests/backtest.py b/tests/backtest.py
index 439493d..574e6ac 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.
@@ -20,7 +20,7 @@ def run_command(cmd):
stderr=subprocess.STDOUT
)
output, _ = proc.communicate()
- status = proc.returncode # pylint: disable=E1101
+ status = proc.returncode
# Get the output, and canonicalize it to strings with newlines.
if not isinstance(output, str):
diff --git a/tests/test_api.py b/tests/test_api.py
index 31bfc57..ca65d6d 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 80a82d9..b7ab81e 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 fe82ea1..4998126 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_concurrency.py b/tests/test_concurrency.py
index 6fbac4a..02163d2 100644
--- a/tests/test_concurrency.py
+++ b/tests/test_concurrency.py
@@ -10,17 +10,17 @@ from tests.coveragetest import CoverageTest
# These libraries aren't always available, we'll skip tests if they aren't.
try:
- import eventlet # pylint: disable=import-error
+ import eventlet
except ImportError:
eventlet = None
try:
- import gevent # pylint: disable=import-error
+ import gevent
except ImportError:
gevent = None
try:
- import greenlet # pylint: disable=import-error
+ import greenlet
except ImportError:
greenlet = None
diff --git a/tests/test_farm.py b/tests/test_farm.py
index 9e369cf..661c67b 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_misc.py b/tests/test_misc.py
index 37191f6..a2b39a8 100644
--- a/tests/test_misc.py
+++ b/tests/test_misc.py
@@ -2,10 +2,11 @@
import sys
-from coverage.misc import Hasher, file_be_gone
+from coverage.misc import Hasher, file_be_gone, overrides
from coverage import __version__, __url__
from tests.coveragetest import CoverageTest
+
class HasherTest(CoverageTest):
"""Test our wrapper of md5 hashing."""
@@ -79,3 +80,53 @@ class SetupPyTest(CoverageTest):
self.assertGreater(len(long_description), 7)
self.assertNotEqual(long_description[0].strip(), "")
self.assertNotEqual(long_description[-1].strip(), "")
+
+
+class OverridesTest(CoverageTest):
+ """Test plugins.py:overrides."""
+
+ run_in_temp_dir = False
+
+ def test_overrides(self):
+ class SomeBase(object):
+ """Base class, two base methods."""
+ def method1(self):
+ pass
+
+ def method2(self):
+ pass
+
+ class Derived1(SomeBase):
+ """Simple single inheritance."""
+ def method1(self):
+ pass
+
+ self.assertTrue(overrides(Derived1(), "method1", SomeBase))
+ self.assertFalse(overrides(Derived1(), "method2", SomeBase))
+
+ class FurtherDerived1(Derived1):
+ """Derive again from Derived1, inherit its method1."""
+ pass
+
+ self.assertTrue(overrides(FurtherDerived1(), "method1", SomeBase))
+ self.assertFalse(overrides(FurtherDerived1(), "method2", SomeBase))
+
+ class FurtherDerived2(Derived1):
+ """Override the overridden method."""
+ def method1(self):
+ pass
+
+ self.assertTrue(overrides(FurtherDerived2(), "method1", SomeBase))
+ self.assertFalse(overrides(FurtherDerived2(), "method2", SomeBase))
+
+ class Mixin(object):
+ """A mixin that overrides method1."""
+ def method1(self):
+ pass
+
+ class Derived2(Mixin, SomeBase):
+ """A class that gets the method from the mixin."""
+ pass
+
+ self.assertTrue(overrides(Derived2(), "method1", SomeBase))
+ self.assertFalse(overrides(Derived2(), "method2", SomeBase))
diff --git a/tests/test_plugins.py b/tests/test_plugins.py
index 83840ea..7c4986a 100644
--- a/tests/test_plugins.py
+++ b/tests/test_plugins.py
@@ -5,7 +5,7 @@ import sys
from nose.plugins.skip import SkipTest
import coverage
-from coverage.plugin import Plugins, overrides
+from coverage.plugin import Plugins
import coverage.plugin
@@ -162,53 +162,3 @@ class PluginTest(CoverageTest):
self.assertEqual(missing, [])
_, statements, _, _ = cov.analysis("/src/try_ABC.zz")
self.assertEqual(statements, [105, 106, 107, 205, 206, 207])
-
-
-class OverridesTest(CoverageTest):
- """Test plugins.py:overrides."""
-
- run_in_temp_dir = False
-
- def test_overrides(self):
- class SomeBase(object):
- """Base class, two base methods."""
- def method1(self):
- pass
-
- def method2(self):
- pass
-
- class Derived1(SomeBase):
- """Simple single inheritance."""
- def method1(self):
- pass
-
- self.assertTrue(overrides(Derived1(), "method1", SomeBase))
- self.assertFalse(overrides(Derived1(), "method2", SomeBase))
-
- class FurtherDerived1(Derived1):
- """Derive again from Derived1, inherit its method1."""
- pass
-
- self.assertTrue(overrides(FurtherDerived1(), "method1", SomeBase))
- self.assertFalse(overrides(FurtherDerived1(), "method2", SomeBase))
-
- class FurtherDerived2(Derived1):
- """Override the overridden method."""
- def method1(self):
- pass
-
- self.assertTrue(overrides(FurtherDerived2(), "method1", SomeBase))
- self.assertFalse(overrides(FurtherDerived2(), "method2", SomeBase))
-
- class Mixin(object):
- """A mixin that overrides method1."""
- def method1(self):
- pass
-
- class Derived2(Mixin, SomeBase):
- """A class that gets the method from the mixin."""
- pass
-
- self.assertTrue(overrides(Derived2(), "method1", SomeBase))
- self.assertFalse(overrides(Derived2(), "method2", SomeBase))
diff --git a/tests/test_process.py b/tests/test_process.py
index ac5c6e1..4584e7d 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 b52c912..cf255e5 100644
--- a/tests/test_summary.py
+++ b/tests/test_summary.py
@@ -201,7 +201,6 @@ class SummaryTest(CoverageTest):
self.assertEqual(out, 'x\ny\n')
report = self.report_from_command("coverage report --show-missing")
- # pylint: disable=C0301
# Name Stmts Miss Branch BrPart Cover Missing
# -------------------------------------------------------
# main 1 0 0 0 100%
@@ -292,7 +291,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
@@ -358,7 +357,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)
@@ -367,7 +366,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)
@@ -400,7 +399,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)
@@ -430,7 +429,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_templite.py b/tests/test_templite.py
index aa697b7..b3e21e7 100644
--- a/tests/test_templite.py
+++ b/tests/test_templite.py
@@ -4,9 +4,7 @@ import re
from coverage.templite import Templite, TempliteSyntaxError
from tests.coveragetest import CoverageTest
-# pylint: disable=W0612,E1101
-# Disable W0612 (Unused variable) and
-# E1101 (Instance of 'foo' has no 'bar' member)
+# pylint: disable=unused-variable
class AnyOldObject(object):
"""Simple testing object.
diff --git a/tests/test_xml.py b/tests/test_xml.py
index 37ada3c..3c7d236 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")