diff options
| author | Ned Batchelder <ned@nedbatchelder.com> | 2015-01-24 19:21:44 -0500 |
|---|---|---|
| committer | Ned Batchelder <ned@nedbatchelder.com> | 2015-01-24 19:21:44 -0500 |
| commit | 946a4c71ab5a01af80a0a24f695f2674a8ef37a8 (patch) | |
| tree | 041ac4e25860d1bed16172b2b9d7b7a1bb6d8591 /tests | |
| parent | b6ee143b06ef403a5d74e7b7be3354c58d725312 (diff) | |
| download | python-coveragepy-946a4c71ab5a01af80a0a24f695f2674a8ef37a8.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')
| -rw-r--r-- | tests/test_plugins.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/test_plugins.py b/tests/test_plugins.py index 2a8b089..8c8d32e 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 |
