[issue4197] Doctest module does not work with zipped packages
Alexander Belopolsky
report at bugs.python.org
Sat Oct 25 00:22:15 CEST 2008
Alexander Belopolsky <belopolsky at users.sourceforge.net> added the comment:
I don't think there is an easy way to fix source file name reporting
without injecting __file__ = '<path to archive>/<filename>' into the
module namespace is zipimporter, but I don't know if any code relies on
__file__ set to None.
Setting __file__ to (in the test case) testmodule.zip/__main__.py will
eliminate the need for the first patch and the second patch will only need
to pass globs to linecache.getlines() to fix the line number issue.
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4197>
_______________________________________
More information about the Python-bugs-list
mailing list