summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2015-07-03 08:56:48 -0400
committerNed Batchelder <ned@nedbatchelder.com>2015-07-03 08:56:48 -0400
commit09dd9334a2cc7976c1a42f795eba5864aaf930f0 (patch)
treefc0b394c420158fe569355650a35389fcc34239b /tests
parentabb3536b66910ddec0e83d3d2a251607d4f5223a (diff)
downloadpython-coveragepy-git-09dd9334a2cc7976c1a42f795eba5864aaf930f0.tar.gz
Clean up some pylint
Diffstat (limited to 'tests')
-rw-r--r--tests/test_parser.py1
-rw-r--r--tests/test_plugins.py6
2 files changed, 4 insertions, 3 deletions
diff --git a/tests/test_parser.py b/tests/test_parser.py
index 2cf39baa..b3f41dd5 100644
--- a/tests/test_parser.py
+++ b/tests/test_parser.py
@@ -119,6 +119,7 @@ class ParserFileTest(CoverageTest):
def parse_file(self, filename):
"""Parse `text` as source, and return the `PythonParser` used."""
+ # pylint: disable=attribute-defined-outside-init
parser = PythonParser(filename=filename, exclude="nocover")
self.statements, self.excluded = parser.parse_source()
return parser
diff --git a/tests/test_plugins.py b/tests/test_plugins.py
index 18edf66f..1ffb73bf 100644
--- a/tests/test_plugins.py
+++ b/tests/test_plugins.py
@@ -220,12 +220,10 @@ class PluginTest(CoverageTest):
class PluginWarningOnPyTracer(CoverageTest):
"""Test that we get a controlled exception with plugins on PyTracer."""
- def setUp(self):
- super(PluginWarningOnPyTracer, self).setUp()
+ def test_exception_if_plugins_on_pytracer(self):
if env.C_TRACER:
self.skip("This test is only about PyTracer.")
- def test_exception_if_plugins_on_pytracer(self):
self.make_file("simple.py", """a = 1""")
cov = coverage.Coverage()
@@ -233,6 +231,7 @@ class PluginWarningOnPyTracer(CoverageTest):
warnings = []
def capture_warning(msg):
+ """A fake implementation of Coverage._warn, to capture warnings."""
warnings.append(msg)
cov._warn = capture_warning
@@ -283,6 +282,7 @@ class GoodPluginTest(FileTracerTest):
self.assertEqual(statements, [105, 106, 107, 205, 206, 207])
def make_render_and_caller(self):
+ """Make the render.py and caller.py files we need."""
# plugin2 emulates a dynamic tracing plugin: the caller's locals
# are examined to determine the source file and line number.
# The plugin is in tests/plugin2.py.