coverage not work in subprocess mode

Issue #269 invalid
Former user created an issue

I have following simple codes:
import os, subprocess, shlex,time

def extest():
    cmd = 'python'
    cmdlist = shlex.split(cmd)
    process = subprocess.Popen(cmdlist)



print "ex---done"
print "test"

I set COVERAGE_PROCESS_START to .bashrc, and also insert following code to

import coverage

after that, i run: coverage run --parallel -source=. I expect could get the report for both and, however, none of them appear in the report ,instead, something like:


appear in the report

what could be the reason?

Comments (4)

  1. Ned Batchelder repo owner

    COVERAGE_PROCESS_START should point to a .coveragerc file, not your .bashrc file, though I don't think that's the problem.

    Can you show the actual output from a terminal session that shows the contents of your files, and your command lines, the report output, etc?

  2. Ned Batchelder repo owner

    Actually, using a ticket for this is unlikely to work, esp since you are Anonymous. Can you send an email with the details, and we'll work through why your subprocess isn't being measured.

  3. Log in to comment