[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 
_run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/Users/sasha/Work/python-svn/trunk/Lib/runpy.py", line 34, in 
_run_code
    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, 
extraglobs=extraglobs):
  File "/Users/sasha/Work/python-svn/trunk/Lib/doctest.py", line 842, in 
find
    self._find(tests, obj, name, module, source_lines, globs, {})
  File "/Users/sasha/Work/python-svn/trunk/Lib/doctest.py", line 884, in 
_find
    test = self._get_test(obj, name, module, globs, source_lines)
  File "/Users/sasha/Work/python-svn/trunk/Lib/doctest.py", line 965, in 
_get_test
    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>
<http://bugs.python.org/issue4197>
_______________________________________


More information about the New-bugs-announce mailing list