Skip to content

Commit 6cda394

Browse files
committed
Fix input_coverage ignored
1 parent 2e7ed00 commit 6cda394

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

coverage/cmdline.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ class Opts:
125125
help="Write the JSON report to this file. Defaults to 'coverage.json'",
126126
)
127127
output_coverage = optparse.make_option(
128-
'-o', '', action='store', dest="outfile",
128+
'-o', '', action='store', dest="output_coverage",
129129
metavar="OUTFILE",
130130
help="Write the recorded coverage information to this file. Defaults to '.coverage'"
131131
)
@@ -588,7 +588,8 @@ def command_line(self, argv):
588588
else:
589589
concurrency = None
590590

591-
data_file = options.outfile if options.action == "run" else None
591+
data_file = getattr(options, "output_coverage", None) \
592+
or getattr(options, "input_coverage", None)
592593
# Do something.
593594
self.coverage = Coverage(
594595
data_file=data_file or DEFAULT_DATAFILE,

0 commit comments

Comments
 (0)