New submission from Wummel:

Hi,

the trace module does not properly count the global statement. So
coverage tests of functions that use the global statement always file.

To reproduce write a simple function using the global statement and
store it in "mytest.py" (which is attached). Then run "python -m trace
-c mytest.py".
You'll see that the global statement line will not be covered (ie. there
is no "1:" at the beginning of the line).

I tested with Python 2.5 and 2.4.

----------
components: Extension Modules
files: mytest.py
messages: 59021
nosy: calvin
severity: normal
status: open
title: trace module does not annotate global statement
type: behavior
Added file: http://bugs.python.org/file9033/mytest.py

__________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1705>
__________________________________
# coverage test for the trace module
# run with: "python -m trace -c mytest.py"
t = 1

def f():
    global t
    t = 2

if __name__ == '__main__':
    f()
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to