From f12672d37060f986246e5cb13dfd036ab09eb70b Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Sat, 24 Jan 2015 19:21:44 -0500 Subject: 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. --- tests/test_plugins.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'tests') 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 -- cgit v1.2.1