Can coverage.py be used to measure code coverage of specific file in a python Google App Engine app?
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.
开发者_StackOverflow社区coverage run --source=/Users/me/myapp /usr/local/bin/dev_appserver.py myapp -p 8080
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 .
精彩评论