diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2016-10-21 15:16:04 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2016-10-21 15:16:04 -0400 |
commit | cb77fe4a51589614d4870cdf2d5bd7ee2524f4d5 (patch) | |
tree | 9b3312425bf3df099c902e51ffc594f3197ed0b9 /tests/test_config.py | |
parent | 15f879b94b06d268f74c195a5614c7ca429363ce (diff) | |
download | python-coveragepy-git-cb77fe4a51589614d4870cdf2d5bd7ee2524f4d5.tar.gz |
Test the debug settings more, and strip spaces from the environment variable
Diffstat (limited to 'tests/test_config.py')
-rw-r--r-- | tests/test_config.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/test_config.py b/tests/test_config.py index cf8a6a7f..1c980b86 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -95,6 +95,15 @@ class ConfigTest(CoverageTest): cov = coverage.Coverage(data_file="fromarg.dat") self.assertEqual(cov.config.data_file, "fromarg.dat") + def test_debug_from_environment(self): + self.make_file(".coveragerc", """\ + [run] + debug = dataio, pids + """) + self.set_environ("COVERAGE_DEBUG", "callers, fooey") + cov = coverage.Coverage() + self.assertEqual(cov.config.debug, ["dataio", "pids", "callers", "fooey"]) + def test_parse_errors(self): # Im-parsable values raise CoverageException, with details. bad_configs_and_msgs = [ @@ -236,6 +245,7 @@ class ConfigFileTest(CoverageTest): plugins = plugins.a_plugin plugins.another + debug = callers, pids , dataio [{section}report] ; these settings affect reporting. @@ -300,6 +310,7 @@ class ConfigFileTest(CoverageTest): self.assertEqual(cov.config.data_file, "something_or_other.dat") self.assertTrue(cov.config.branch) self.assertTrue(cov.config.cover_pylib) + self.assertEqual(cov.config.debug, ["callers", "pids", "dataio"]) self.assertTrue(cov.config.parallel) self.assertEqual(cov.config.concurrency, ["thread"]) self.assertEqual(cov.config.source, ["myapp"]) |