开发者

Can coverage.py be used to measure code coverage of specific file in a python Google App Engine app?

开发者 https://www.devze.com 2023-02-28 18:00 出处:网络
I am currently working through the process of trying to measure code coverage for python files in a Python Google App Engine app. I\'d like to run the dev server locally and then run my gaeunit tests

I am currently working through the process of trying to measure code coverage for python files in a Python Google App Engine app. I'd like to run the dev server locally and then run my gaeunit tests and measure the coverage that they produce.

Is there a recommended way to measure coverage of python files in a GAE app when using GAEUnit rather than NOSE? Here is the commandline that I'm working towards.

coverage run --source=/Users/me/myapp /usr/local/bin/dev_appserver.py myapp -p 8080

开发者_StackOverflow社区

Then access localhost/tests and shutdown the dev_appserver after the tests are complete.

coverage html


I use the following (from my app root) when running coverage.py with GAEUnit:

coverage run --source=./ /usr/local/bin/dev_appserver.py --clear_datastore --use_sqlite .
0

精彩评论

暂无评论...
验证码 换一张
取 消