thriftrw / thriftrw-python

A Thrift encoding library for Python
MIT License
36 stars 10 forks source link

Fix coverage measurement for Cythonized code #74

Closed abhinav closed 9 years ago

abhinav commented 9 years ago

The THRIFTRW_COVERAGE and THRIFTRW_PROFILE environment variables will be used to enable line-tracing hooks and profiling hooks. Line tracking hooks have a performance penalty so they will be used during tests only. Profiling hooks can be used to get meaningful cProfile output out of thriftrw.

It appears that types specified in Cython code count as uncovered code if they're never called with the wrong types (because Cython raises exceptions if types don't match), so the coverage we see here will be lower than before the code was cythonized.

HelloGrayson commented 9 years ago

:goat: :goat: :goat:

blampe commented 9 years ago

This makes me so happy but also so sad.

abhinav commented 9 years ago

We can rebuilt it. We have the technology.