diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2014-10-11 08:06:17 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2014-10-11 08:06:17 -0400 |
commit | 066a693d77b0b950653cf5b577d308da594fa471 (patch) | |
tree | 2bd4fd8628ffb682be8116a4ca0a50f4187012ff /tests/test_plugins.py | |
parent | 99c52f24c5db26a98d77816a3c7ada0f4f7f8797 (diff) | |
download | python-coveragepy-git-066a693d77b0b950653cf5b577d308da594fa471.tar.gz |
Can change config after construction.
Diffstat (limited to 'tests/test_plugins.py')
-rw-r--r-- | tests/test_plugins.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/test_plugins.py b/tests/test_plugins.py index 1bd2067d..1540c500 100644 --- a/tests/test_plugins.py +++ b/tests/test_plugins.py @@ -101,7 +101,8 @@ class PluginTest(CoverageTest): """) self.assert_doesnt_exist("evidence.out") - cov = coverage.Coverage(plugins=["my_plugin"]) + cov = coverage.Coverage() + cov.config["run:plugins"] = ["my_plugin"] cov.start() cov.stop() @@ -111,7 +112,8 @@ class PluginTest(CoverageTest): def test_missing_plugin_raises_import_error(self): # Prove that a missing plugin will raise an ImportError. with self.assertRaises(ImportError): - cov = coverage.Coverage(plugins=["does_not_exist_woijwoicweo"]) + cov = coverage.Coverage() + cov.config["run:plugins"] = ["does_not_exist_woijwoicweo"] cov.start() cov.stop() @@ -121,7 +123,8 @@ class PluginTest(CoverageTest): 1/0 """) with self.assertRaises(ZeroDivisionError): - cov = coverage.Coverage(plugins=["plugin_over_zero"]) + cov = coverage.Coverage() + cov.config["run:plugins"] = ["plugin_over_zero"] cov.start() cov.stop() @@ -139,7 +142,8 @@ class PluginTest(CoverageTest): d = 4 """) - cov = coverage.Coverage(plugins=["tests.test_plugins"]) + cov = coverage.Coverage() + cov.config["run:plugins"] = ["tests.test_plugins"] # Import the python file, executing it. self.start_import_stop(cov, "simple") |