[New-bugs-announce] [issue4197] Doctest module does not work with zipped packages

Alexander Belopolsky report at bugs.python.org
Fri Oct 24 23:59:37 CEST 2008

New submission from Alexander Belopolsky <belopolsky at users.sourceforge.net>:

With attached teestmodule.zip and svn revision 67006,

$ ./python.exe testmodule.zip 
Traceback (most recent call last):
  File "/Users/sasha/Work/python-svn/trunk/Lib/runpy.py", line 121, in 
    "__main__", fname, loader, pkg_name)
  File "/Users/sasha/Work/python-svn/trunk/Lib/runpy.py", line 34, in 
    exec code in run_globals
  File "testmodule.zip/__main__.py", line 7, in <module>
  File "/Users/sasha/Work/python-svn/trunk/Lib/doctest.py", line 1817, 
in testmod
    for test in finder.find(m, name, globs=globs, 
  File "/Users/sasha/Work/python-svn/trunk/Lib/doctest.py", line 842, in 
    self._find(tests, obj, name, module, source_lines, globs, {})
  File "/Users/sasha/Work/python-svn/trunk/Lib/doctest.py", line 884, in 
    test = self._get_test(obj, name, module, globs, source_lines)
  File "/Users/sasha/Work/python-svn/trunk/Lib/doctest.py", line 965, in 
    if filename[-4:] in (".pyc", ".pyo"):
TypeError: 'NoneType' object is unsubscriptable

components: Library (Lib)
files: testmodule.zip
messages: 75186
nosy: belopolsky
severity: normal
status: open
title: Doctest module does not work with zipped packages
type: crash
versions: Python 2.7
Added file: http://bugs.python.org/file11877/testmodule.zip

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list