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 | ef25f573bf2166e437495a6e152e08b0efdeed52 (patch) | |
tree | 2442ac6956819730d978b50f32505d9348817ef7 /tests/test_config.py | |
parent | 38c02cc781e8de703cac6df7227e33c4f93c904a (diff) | |
download | python-coveragepy-ef25f573bf2166e437495a6e152e08b0efdeed52.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 4c8735d..109a2fb 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.""" |