This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author luks
Recipients
Date 2006-10-24.15:55:56
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Here is an example script:

def myiter():
    for i in range(10):
        yield i
for i in myiter():
    break
print "foo"

Now, if I try to trace it:

$ python -m trace --trace --count test.py
 --- modulename: threading, funcname: settrace
threading.py(70):     _trace_hook = func
 --- modulename: test, funcname: <module>
test.py(1): def myiter():
test.py(5): for i in myiter():
 --- modulename: test, funcname: myiter
test.py(2):     for i in range(10):
test.py(3):         yield i
test.py(6):     break
c:\python25\lib\ntpath.py:190: RuntimeWarning:
tp_compare didn't return -1 or -2 for exception
  if i<=max(p.rfind('/'), p.rfind('\\')):
foo

It stops tracing after the `break` statement. The line
after, `print "foo"`, is not traced nor included in the
coverage output.

I'm not sure RuntimeWarning from ntpath.py is relevant
here, because if I use the trace module in some other
situation it doesn't print it. IMO, it's just a side
effect of some different problem.
History
Date User Action Args
2007-08-23 14:49:03adminlinkissue1583862 messages
2007-08-23 14:49:03admincreate