diff options
-rw-r--r-- | CHANGES.txt | 4 | ||||
-rw-r--r-- | coverage/cmdline.py | 2 | ||||
-rw-r--r-- | tests/test_cmdline.py | 15 |
3 files changed, 20 insertions, 1 deletions
diff --git a/CHANGES.txt b/CHANGES.txt index 1211e8e3..aefbb5cd 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -47,10 +47,14 @@ Latest - The project is consistently referred to as "coverage.py" throughout the code and the documentation, closing `issue 275`_. +- Combining data files with an explicit configuration file was broken in 4.0a6, + but now works again, closing `issue 385`_. + .. _issue 236: https://bitbucket.org/ned/coveragepy/issues/236/pickles-are-bad-and-you-should-feel-bad .. _issue 275: https://bitbucket.org/ned/coveragepy/issues/275/refer-consistently-to-project-as-coverage .. _issue 313: https://bitbucket.org/ned/coveragepy/issues/313/add-license-file-containing-2-3-or-4 .. _issue 380: https://bitbucket.org/ned/coveragepy/issues/380/code-executed-by-exec-excluded-from +.. _issue 385: https://bitbucket.org/ned/coveragepy/issues/385/coverage-combine-doesnt-work-with-rcfile .. _issue 386: https://bitbucket.org/ned/coveragepy/issues/386/error-on-unrecognised-configuration .. 41 issues closed in 4.0 below here diff --git a/coverage/cmdline.py b/coverage/cmdline.py index b4deb588..669c569e 100644 --- a/coverage/cmdline.py +++ b/coverage/cmdline.py @@ -436,7 +436,7 @@ class CoverageScript(object): self.do_run(options, args) if options.action == "combine": - data_dirs = argv if argv else None + data_dirs = args or None self.coverage.combine(data_dirs) self.coverage.save() diff --git a/tests/test_cmdline.py b/tests/test_cmdline.py index a74498d4..f0120bb3 100644 --- a/tests/test_cmdline.py +++ b/tests/test_cmdline.py @@ -200,6 +200,21 @@ class CmdLineTest(BaseCmdLineTest): .save() """) + def test_combine_doesnt_confuse_options_with_args(self): + # https://bitbucket.org/ned/coveragepy/issues/385/coverage-combine-doesnt-work-with-rcfile + self.cmd_executes("combine --rcfile cov.ini", """\ + .coverage(config_file='cov.ini') + .load() + .combine(None) + .save() + """) + self.cmd_executes("combine --rcfile cov.ini data1 data2/more", """\ + .coverage(config_file='cov.ini') + .load() + .combine(["data1", "data2/more"]) + .save() + """) + def test_debug(self): self.cmd_help("debug", "What information would you like: data, sys?") self.cmd_help("debug foo", "Don't know what you mean by 'foo'") |