New submission from Geoff Bache <geoff.bache@...>:
I've been trying to measure coverage of my Jython program and finding
that (at least) all lines containing "try:", "except:" or "break"
never get shown as covered.
This appears to be because the sys.settrace function, on which
coverage.py relies for its information, is not triggered by such
For example, compare the output of the following program under Jython
and CPython. No output is created for lines 10, 12 or 13 when running
under Jython, whereas it is for CPython.
def tracefunc(frame, event, arg):
print "Trace", event, frame.f_lineno
x = [ 1 ]
for i in range(2):
title: sys.settrace does not consider "try", "except" or "break" statements
Jython tracker <report@...>
Get latest updates about Open Source Projects, Conferences and News.