diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2020-06-30 08:03:45 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2020-06-30 08:03:45 -0400 |
commit | 97f05c988545f8ca588253fd325401c4834543b6 (patch) | |
tree | 41b223ce1a1bf1f33aaad9ffd41351156ad92da6 /coverage/cmdline.py | |
parent | d00f254315ef4e97e86e230c448d6325c97e08dc (diff) | |
download | python-coveragepy-git-nedbat/bug976.tar.gz |
--skip-empty now applies to the XML report also. #976nedbat/bug976
Diffstat (limited to 'coverage/cmdline.py')
-rw-r--r-- | coverage/cmdline.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/coverage/cmdline.py b/coverage/cmdline.py index 7af7913e..059d42a2 100644 --- a/coverage/cmdline.py +++ b/coverage/cmdline.py @@ -446,6 +446,7 @@ CMDS = { Opts.include, Opts.omit, Opts.output_xml, + Opts.skip_empty, ] + GLOBAL_ARGS, usage="[options] [modules]", description="Generate an XML report of coverage results." @@ -616,7 +617,10 @@ class CoverageScript(object): ) elif options.action == "xml": outfile = options.outfile - total = self.coverage.xml_report(outfile=outfile, **report_args) + total = self.coverage.xml_report( + outfile=outfile, skip_empty=options.skip_empty, + **report_args + ) elif options.action == "json": outfile = options.outfile total = self.coverage.json_report( |