summaryrefslogtreecommitdiff
path: root/tests/test_plugins.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2018-02-10 12:39:36 -0500
committerNed Batchelder <ned@nedbatchelder.com>2018-02-10 12:39:36 -0500
commitf9161bd5e7897c22ea5f72c18b448e62bcdf7ea3 (patch)
tree83aef5772efab9538ba4adbf60017f62b343931b /tests/test_plugins.py
parentc4a4b7dd2d73b0707e78f6c9e85dc0447414c8dc (diff)
downloadpython-coveragepy-git-f9161bd5e7897c22ea5f72c18b448e62bcdf7ea3.tar.gz
Configurer plugins should be reported by --debug=sys
Diffstat (limited to 'tests/test_plugins.py')
-rw-r--r--tests/test_plugins.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/test_plugins.py b/tests/test_plugins.py
index 2e8d52f8..07752763 100644
--- a/tests/test_plugins.py
+++ b/tests/test_plugins.py
@@ -183,7 +183,7 @@ class PluginTest(CoverageTest):
return [("hello", "world")]
def coverage_init(reg, options):
- reg.add_noop(Plugin())
+ reg.add_file_tracer(Plugin())
""")
debug_out = StringIO()
cov = coverage.Coverage(debug=["sys"])
@@ -191,10 +191,11 @@ class PluginTest(CoverageTest):
cov.set_option("run:plugins", ["plugin_sys_info"])
cov.load()
- out_lines = debug_out.getvalue().splitlines()
+ out_lines = [line.strip() for line in debug_out.getvalue().splitlines()]
+ self.assertIn('plugins.file_tracers: plugin_sys_info.Plugin', out_lines)
expected_end = [
"-- sys: plugin_sys_info.Plugin -------------------------------",
- " hello: world",
+ "hello: world",
"-- end -------------------------------------------------------",
]
self.assertEqual(expected_end, out_lines[-len(expected_end):])
@@ -207,7 +208,7 @@ class PluginTest(CoverageTest):
pass
def coverage_init(reg, options):
- reg.add_noop(Plugin())
+ reg.add_configurer(Plugin())
""")
debug_out = StringIO()
cov = coverage.Coverage(debug=["sys"])
@@ -215,7 +216,8 @@ class PluginTest(CoverageTest):
cov.set_option("run:plugins", ["plugin_no_sys_info"])
cov.load()
- out_lines = debug_out.getvalue().splitlines()
+ out_lines = [line.strip() for line in debug_out.getvalue().splitlines()]
+ self.assertIn('plugins.configurers: plugin_no_sys_info.Plugin', out_lines)
expected_end = [
"-- sys: plugin_no_sys_info.Plugin ----------------------------",
"-- end -------------------------------------------------------",