summaryrefslogtreecommitdiff
path: root/tests/test_plugins.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2015-01-24 19:21:44 -0500
committerNed Batchelder <ned@nedbatchelder.com>2015-01-24 19:21:44 -0500
commitf12672d37060f986246e5cb13dfd036ab09eb70b (patch)
treec6717fe8209b3221a4f6c4b611eda0bf1c694ea1 /tests/test_plugins.py
parent3418b08b1bf8a4aa7bb5ce27721d9b8b87492338 (diff)
downloadpython-coveragepy-git-f12672d37060f986246e5cb13dfd036ab09eb70b.tar.gz
Set timid=True automatically for plugins
This is better than asking people to add timid=True to their configs, since this way they won't have to clean it out of their config later.
Diffstat (limited to 'tests/test_plugins.py')
-rw-r--r--tests/test_plugins.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/test_plugins.py b/tests/test_plugins.py
index 2a8b089d..8c8d32e8 100644
--- a/tests/test_plugins.py
+++ b/tests/test_plugins.py
@@ -32,6 +32,21 @@ class FakeConfig(object):
class LoadPluginsTest(CoverageTest):
"""Test Plugins.load_plugins directly."""
+ def test_implicit_boolean(self):
+ self.make_file("plugin1.py", """\
+ from coverage import CoveragePlugin
+
+ class Plugin(CoveragePlugin):
+ pass
+ """)
+
+ config = FakeConfig("plugin1", {})
+ plugins = Plugins.load_plugins([], config)
+ self.assertFalse(plugins)
+
+ plugins = Plugins.load_plugins(["plugin1"], config)
+ self.assertTrue(plugins)
+
def test_importing_and_configuring(self):
self.make_file("plugin1.py", """\
from coverage import CoveragePlugin