diff --git a/coverage/cmdline.py b/coverage/cmdline.py index b8c317f2b..ec5af05c6 100644 --- a/coverage/cmdline.py +++ b/coverage/cmdline.py @@ -125,12 +125,12 @@ class Opts: help="Write the JSON report to this file. Defaults to 'coverage.json'", ) output_coverage = optparse.make_option( - '-o', '', action='store', dest="output_coverage", + '', '--data-file', action='store', dest="output_coverage", metavar="OUTFILE", help="Write the recorded coverage information to this file. Defaults to '.coverage'" ) input_coverage = optparse.make_option( - '-c', '--input-coverage', action='store', dest="input_coverage", + '', '--data-file', action='store', dest="input_coverage", metavar="INPUT", help="Read coverage data for report generation from this file (needed if you have " "specified -o previously). Defaults to '.coverage'" diff --git a/tests/test_cmdline.py b/tests/test_cmdline.py index 653c23412..a6c8c0fce 100644 --- a/tests/test_cmdline.py +++ b/tests/test_cmdline.py @@ -247,7 +247,7 @@ def test_combine(self): cov.combine(None, strict=True, keep=False) cov.save() """) - self.cmd_executes("combine -o foo.cov", """\ + self.cmd_executes("combine --data-file=foo.cov", """\ cov = Coverage(data_file="foo.cov") cov.combine(None, strict=True, keep=False) cov.save() @@ -307,7 +307,7 @@ def test_erase(self): cov = Coverage() cov.erase() """) - self.cmd_executes("erase -c foo.cov", """\ + self.cmd_executes("erase --data-file=foo.cov", """\ cov = Coverage(data_file="foo.cov") cov.erase() """) @@ -521,7 +521,7 @@ def test_report(self): cov.load() cov.report(sort='-foo') """) - self.cmd_executes("report -c foo.cov.2", """\ + self.cmd_executes("report --data-file=foo.cov.2", """\ cov = Coverage(data_file="foo.cov.2") cov.load() cov.report(show_missing=None) @@ -652,7 +652,7 @@ def test_run(self): cov.stop() cov.save() """) - self.cmd_executes("run -o output.coverage foo.py", """\ + self.cmd_executes("run --data-file=output.coverage foo.py", """\ cov = Coverage(data_file="output.coverage") runner = PyRunner(['foo.py'], as_module=False) runner.prepare()