summaryrefslogtreecommitdiff
path: root/tests/test_plugins.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2014-10-10 14:58:03 -0400
committerNed Batchelder <ned@nedbatchelder.com>2014-10-10 14:58:03 -0400
commit99c52f24c5db26a98d77816a3c7ada0f4f7f8797 (patch)
tree4cf881592df4c9f29d834a8530397addbda6693b /tests/test_plugins.py
parenta444fdd9bece1c919a9525210399ea4bf21353f2 (diff)
downloadpython-coveragepy-git-99c52f24c5db26a98d77816a3c7ada0f4f7f8797.tar.gz
Move lots of initing to _init, so we can tweak settings before starting.
Diffstat (limited to 'tests/test_plugins.py')
-rw-r--r--tests/test_plugins.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/test_plugins.py b/tests/test_plugins.py
index 1f175f21..1bd2067d 100644
--- a/tests/test_plugins.py
+++ b/tests/test_plugins.py
@@ -101,7 +101,9 @@ class PluginTest(CoverageTest):
""")
self.assert_doesnt_exist("evidence.out")
- _ = coverage.Coverage(plugins=["my_plugin"])
+ cov = coverage.Coverage(plugins=["my_plugin"])
+ cov.start()
+ cov.stop()
with open("evidence.out") as f:
self.assertEqual(f.read(), "we are here!")
@@ -111,6 +113,7 @@ class PluginTest(CoverageTest):
with self.assertRaises(ImportError):
cov = coverage.Coverage(plugins=["does_not_exist_woijwoicweo"])
cov.start()
+ cov.stop()
def test_bad_plugin_isnt_hidden(self):
# Prove that a plugin with an error in it will raise the error.
@@ -118,7 +121,9 @@ class PluginTest(CoverageTest):
1/0
""")
with self.assertRaises(ZeroDivisionError):
- _ = coverage.Coverage(plugins=["plugin_over_zero"])
+ cov = coverage.Coverage(plugins=["plugin_over_zero"])
+ cov.start()
+ cov.stop()
def test_importing_myself(self):
if sys.platform == 'win32':