[TIP] Coverage kills python with sys.settrace(None): how to work around?
ned at nedbatchelder.com
Mon Mar 9 06:32:20 PDT 2015
On 3/9/15 5:52 AM, Michael McNeil Forbes wrote:
> I am trying to run coverage via nosetests from setup.py, but once the coverage report is produced, coverage calls sys.settrace(None) which rapidly kills everything and I can no longer continue processing. (I would like to run some additional tests after like pep8 syntax checks etc.)
I have not heard of this phenomenon before. Can you provide more
details? Coverage ends its measurement by setting the trace function to
None. Is your code online? Do you have steps to reproduce the problem?
> How can I run coverage on my tests and then continue with other checks if everything is successful?
> I am subclassing Command in my setup.py file defining a run command like:
> def run(self):
> Even if all the nosetests pass, coverage kills everything when the tracer is stopped. As such, I can't even catch an exception.
> testing-in-python mailing list
> testing-in-python at lists.idyll.org
More information about the testing-in-python