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_config.py | |
parent | 99c52f24c5db26a98d77816a3c7ada0f4f7f8797 (diff) | |
download | python-coveragepy-git-066a693d77b0b950653cf5b577d308da594fa471.tar.gz |
Can change config after construction.
Diffstat (limited to 'tests/test_config.py')
-rw-r--r-- | tests/test_config.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/test_config.py b/tests/test_config.py index 4c8735d2..109a2fbc 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -123,6 +123,19 @@ class ConfigTest(CoverageTest): ["the_$one", "anotherZZZ", "xZZZy", "xy", "huh${X}what"] ) + def test_tweaks_after_constructor(self): + # Arguments to the constructor are applied to the configuation. + cov = coverage.coverage(timid=True, data_file="fooey.dat") + cov.config["run:timid"] = False + + self.assertFalse(cov.config.timid) + self.assertFalse(cov.config.branch) + self.assertEqual(cov.config.data_file, "fooey.dat") + + self.assertFalse(cov.config["run:timid"]) + self.assertFalse(cov.config["run:branch"]) + self.assertEqual(cov.config["run:data_file"], "fooey.dat") + class ConfigFileTest(CoverageTest): """Tests of the config file settings in particular.""" |