Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to run Python code coverage tests for Google App Engine in Eclipse or from command line

I want to run Python code coverage tests for Google App Engine in Eclipse or from command line.

Normally Python program required such command line:

coverage run program arguments

I trying to run it for Google App Engine but no data is collected from following command line:

coverage run [path_to_google_app_engine]/dev_appserver.py [application_options] application_root

It not produce .coverage after terminating server - do you have any idea what is wrong? How to stop server and get .coverage data?

like image 305
Chameleon Avatar asked Jun 09 '26 14:06

Chameleon


1 Answers

I don't know much about GAE, but I know a lot about coverage.py. If the dev_appserver.py command runs the server in the same process, then the command you have should work. If the server actually runs in a subprocess, then see Measuring subprocesses in the coverage.py docs for how to get subprocesses measured.

like image 53
Ned Batchelder Avatar answered Jun 12 '26 05:06

Ned Batchelder



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!