Subprocess coverage - strange detection of lines losing coverage · Issue #492 · nedbat/coveragepy (original) (raw)

Skip to content

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

@nedbat

Description

@nedbat

Originally reported by Michał Bultrowicz (Bitbucket: Butla, GitHub: Butla)


I wanted to test out how well subprocess coverage works for WSGI apps and I came across a strange behavior. After running the tests a few times I deliberately commented out a test to see if the coverage dropped - it didn't.

I experimented with that a bit and it turns out, that the loss of coverage will be detected if I run "coverage erase" twice before running the tests. It also seems that it works when I run "erase" from shell and then run my "run_coverage" script with "coverage erase" lines removed. Adding "sleep" in "run_coverage" before a single "coverage erase" doesn't work.

Reproduction steps: