[TIP] Coverage testing a Flask app running behind uWSGI?
skip.montanaro at gmail.com
Tue Mar 13 12:41:05 PDT 2018
I have a Flask application whose functions I'd like to check for
coverage. It unfortunately runs behind uWSGI, and I'm not enough of a
maven about the intersection of Flask, uWSGI, and coverage to have
much idea where to begin. Earlier today I stumbled on the profilehooks
module which allows me to mark individual functions for coverage, but
it uses trace.py under the covers and is pretty inflexible about its
output. I know the coverage package has a decorator which allows you
to exclude specific functions from coverage analysis, but didn't see
anything to go the other direction (only cover specific functions).
I'm probably thinking about this all wrong. Am hoping some folks here
can provide some suggestions.
More information about the testing-in-python