<div dir="ltr">Hi everybody,<div><br></div><div>has someone on this list been using coverage.py to collect code coverage on appengine applications, recently?</div><div><br></div><div>I have been successful in collecting it, in an intrusive manner, hacking sandbox.py and stubs.py (because, in such environment, an application hasn&#39;t the right to write to the disk). Intrusive also means &quot;modifying the code of the running application in order to call CodeCoverage API&quot;. My modifications occasionally generate concurrency errors (because of a failing assert in Collector.stop(), lines 306 and 307). These are the reasons for which I am not satisfied about this way of collecting CC.</div><div><br></div><div>I have also tried to collect the code coverage in a non intrusive way (read: setting the COVERAGE_PROCESS_START environment variable and preparing an ad-hoc pth file that gets loaded during python processes startup). But in this case I collect *nothing* (apart from 5 statements out of 6 in /etc/python/sitecustomize.py). Perhaps because each appengine request is being processed in a particular environment where environment variables have a special meaning (and as such, the calling process environment variables have vanished).</div><div><br></div><div>So, before abandoning the quest, I am searching for ideas or previously successful experiences.</div><div><br></div><div>Just in case, I try to get CC on Ubuntu 16.04 and MacOS, using python 2.7 (a standard appengine environment).</div><div><br></div><div>Many thanks in advance,</div><div>Ivo</div></div>