[issue9317] Incorrect coverage file from trace test_pickle.py

Alexander Belopolsky report at bugs.python.org
Fri Oct 15 20:32:18 CEST 2010


Alexander Belopolsky <belopolsky at users.sourceforge.net> added the comment:

I have found the cause of at least part of the issue.  Apparently, module level statements for some of the modules such as pickle do not show up in trace because they are imported by trace itself.  In other words, by the time traced script gets executed, pickle is already in sys.module and the code therein does not run.

Maybe we should consider clearing sys.modules in Trace.run, but this can cause problems if not done carefully.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9317>
_______________________________________


More information about the Python-bugs-list mailing list