diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2021-10-26 19:07:03 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2021-10-26 19:17:19 -0400 |
commit | 93c9ca9f1b2e5d0b45dbf4b82c77aaf05b458bac (patch) | |
tree | 6b0e1cc009da5e33ca87e8fb096704b27afe1a8f /tests/test_cmdline.py | |
parent | 18cf3b897d4b1e1a66beda180ec151cc0dd4dbc3 (diff) | |
download | python-coveragepy-git-nedbat/dashq.tar.gz |
feat: xml and json say what they are doing, and -q quiets everything. #1254nedbat/dashq
Diffstat (limited to 'tests/test_cmdline.py')
-rw-r--r-- | tests/test_cmdline.py | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/tests/test_cmdline.py b/tests/test_cmdline.py index b0716e6d..9e987760 100644 --- a/tests/test_cmdline.py +++ b/tests/test_cmdline.py @@ -234,6 +234,17 @@ class CmdLineTest(BaseCmdLineTest): cov.combine(None, strict=True, keep=False) cov.save() """) + # coverage combine quietly + self.cmd_executes("combine -q", """\ + cov = Coverage(messages=False) + cov.combine(None, strict=True, keep=False) + cov.save() + """) + self.cmd_executes("combine --quiet", """\ + cov = Coverage(messages=False) + cov.combine(None, strict=True, keep=False) + cov.save() + """) def test_combine_doesnt_confuse_options_with_args(self): # https://github.com/nedbat/coveragepy/issues/385 @@ -335,6 +346,16 @@ class CmdLineTest(BaseCmdLineTest): cov.load() cov.html_report(title='Hello_there') """) + self.cmd_executes("html -q", """\ + cov = Coverage(messages=False) + cov.load() + cov.html_report() + """) + self.cmd_executes("html --quiet", """\ + cov = Coverage(messages=False) + cov.load() + cov.html_report() + """) def test_json(self): # coverage json [-i] [--omit DIR,...] [FILE1 FILE2 ...] @@ -388,6 +409,16 @@ class CmdLineTest(BaseCmdLineTest): cov.load() cov.json_report(morfs=["mod1", "mod2", "mod3"]) """) + self.cmd_executes("json -q", """\ + cov = Coverage(messages=False) + cov.load() + cov.json_report() + """) + self.cmd_executes("json --quiet", """\ + cov = Coverage(messages=False) + cov.load() + cov.json_report() + """) def test_report(self): # coverage report [-m] [-i] [-o DIR,...] [FILE1 FILE2 ...] @@ -753,6 +784,16 @@ class CmdLineTest(BaseCmdLineTest): cov.load() cov.xml_report(morfs=["mod1", "mod2", "mod3"]) """) + self.cmd_executes("xml -q", """\ + cov = Coverage(messages=False) + cov.load() + cov.xml_report() + """) + self.cmd_executes("xml --quiet", """\ + cov = Coverage(messages=False) + cov.load() + cov.xml_report() + """) def test_no_arguments_at_all(self): self.cmd_help("", topic="minimum_help", ret=OK) |