Skip to content

Allow disabling parallel mode from the command line #1783

Closed
@neutrinoceros

Description

@neutrinoceros

Is your feature request related to a problem? Please describe.
I frequently encounter projects that set parallel=true in coveragerc or equivalent, supposedly because they only run coverage through CI, where it makes sense. I find disabling parallel mode is useful for local runs;
if I don't turn it off somehow, coverage report fails with No data to report.

Currently, there isn't a way (as far as I can tell) to override this flag from the command line, so I just end up making temporary changes to the config file, that I must remember not to commit, creating friction. I also frequently forget about this workaround and find myself re-discovering it.

Describe the solution you'd like
Having some way to override the flag from the command line (e.g. --parallel-mode=off or --no-parallel-mode) would help.

Describe alternatives you've considered

  • coverage report and friends (coverage html...) could support parallel=true and lookup data where it actually is. This seems like the truly ideal solution but I don't have a clear view of the big picture so maybe there are technical/historical reasons why this is not feasible ?
  • The error message emitted by coverage report and friends could be improved by hinting at parallel-mode being activated and/or that data exists, just not in the default .coverage directory.

Additional context
I'm willing to implement any solution that you deem suitable myself. Though I suspect that changing the CLI might be potentially tricky to me since I've never used optparse.

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already existsenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions