summaryrefslogtreecommitdiff
path: root/tests/test_api.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2019-09-01 21:34:20 -0400
committerNed Batchelder <ned@nedbatchelder.com>2019-09-01 21:34:20 -0400
commitdd98bb1ebb687e4ff22e255ee97ec8e8cca5e1f6 (patch)
tree4b25e042b0827aac5c68e62d413a5d6e8e1a5fdd /tests/test_api.py
parent4042ce713e373f19ca81948eefcfab83d8dd0bbc (diff)
downloadpython-coveragepy-git-dd98bb1ebb687e4ff22e255ee97ec8e8cca5e1f6.tar.gz
Reporting methods shouldn't permanently change the configuration
Diffstat (limited to 'tests/test_api.py')
-rw-r--r--tests/test_api.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/test_api.py b/tests/test_api.py
index 301257dc..4f248441 100644
--- a/tests/test_api.py
+++ b/tests/test_api.py
@@ -918,3 +918,14 @@ class TestRunnerPluginTest(CoverageTest):
def test_pytestcov_parallel_append(self):
self.pretend_to_be_pytestcov(append=True)
+
+
+class ImmutableConfigTest(CoverageTest):
+ """Check that reporting methods don't permanently change the configuration."""
+ def test_config_doesnt_change(self):
+ self.make_file("simple.py", "a = 1")
+ cov = coverage.Coverage()
+ self.start_import_stop(cov, "simple")
+ self.assertEqual(cov.get_option("report:show_missing"), False)
+ cov.report(show_missing=True)
+ self.assertEqual(cov.get_option("report:show_missing"), False)