Skip to content

CLI --context not used when multiprocessing is enabled(for child processes) #1079

Closed as not planned
@s0undt3ch

Description

@s0undt3ch

Describe the bug
When running coverage and passing --context=foo, only the main process uses that foo static context.
Any sub-processes, which do get coverage because we're setting COVERAGE_PROCESS_START, will not use that foo context, instead, they report an empty context.

To Reproduce
How can we reproduce the problem? Please be specific. Don't just link to a failing CI job. Answer the questions below:

  1. What version of Python are you using?
    It's independent of the python version used.
  2. What version of coverage.py are you using? The output of coverage debug sys is helpful.
    5.3
  3. What versions of what packages do you have installed? The output of pip freeze is helpful.
    A lot, and I don't think they're related to this issue, but I can add that to the issue if strictly necessary.
  4. What code are you running? Give us a specific commit of a specific repo that we can check out.
    https://github.com/s0undt3ch/salt/tree/features/coverage-contexts
  5. What commands did you run?
nox -e 'pytest-zeromq-3(coverage=True)' -- -vv --run-destructive --run-slow --ssh-tests --log-cli-level=debug --showlocals tests/integration/modules/test_config.py --maxfail=1

Expected behavior
I would expect that the context passed through --context, to be "inherited" but any subprocess which has coverage enabled.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingquestionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions