Menu

[r1]: / test-coverage  Maximize  Restore  History

Download this file

26 lines (21 with data), 641 Bytes

#!/bin/sh
#
# Tests that ensure coverage of most source code and scenarios
#
# Use the coverage tool at http://nedbatchelder.com/code/coverage
# May also be an installable package (python-coverage)
#

# clean up environment
coverage -e
rm test.py.cpp.so
rm test.py.cpp.dll

# test scenario with no pre-compiled libraries
coverage -x test.py
# test with up-to-date libraries
coverage -x test.py
# test with old libraries
touch --date yesterday test.py.cpp.so
coverage -x test.py

# show results; the __del__ function runs, but isn't covered in the output
# also Windows code won't be covered on Linux and vice versa
coverage -r -m embedc.py