Getting coverage with dev_appserver.py excludes my

2019-04-26 22:09发布

问题:

I run the following with Coverage 3.6, Appengine 1.8.0, Python 2.7.4 on 64 bit Ubuntu 13.04:

coverage run dev_appserver.py project

When I look at coverage results I can see details for all files except the ones in my project. They show up as zero lines executed if I add --source=project. Trying --timid made no difference. I can see others doing the exact same thing - example 1 2 - implying this used to work.

I terminate coverage/dev_appserver by sending SIGINT, and do wait for it to exit. My suspicion is that the chicanery dev_appserver does to replicate the production environment (eg limiting modules, disabling binary modules, sort of chrooting) is breaking coverage.