[Python-bugs-list] [ python-Bugs-798254 ] doctest crash

SourceForge.net noreply at sourceforge.net
Sun Aug 31 14:26:26 EDT 2003


Bugs item #798254, was opened at 2003-08-31 16:26
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=798254&group_id=5470

Category: Python Library
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Alexander Belopolsky (belopolsky)
Assigned to: Nobody/Anonymous (nobody)
Summary: doctest crash

Initial Comment:
This code:

class A: 
        def f(self): pass 
 
class C(A): 
        g = A.f 
 
import doctest, sys 
doctest.testmod(sys.modules[__name__])

crashes with the following diagnostic:

Traceback (most recent call last): 
  File "<stdin>", line 8, in ? 
  File "/lib/python2.3/doctest.py", line 1147, in testmod 
    f, t = tester.rundict(m.__dict__, name, m) 
  File "/lib/python2.3/doctest.py", line 907, in rundict 
    f2, t2 = self.__runone(value, name + "." + thisname) 
  File "/lib/python2.3/doctest.py", line 1068, in __runone 
    return self.rundoc(target, name) 
  File "/lib/python2.3/doctest.py", line 827, in rundoc 
    f2, t2 = self.run__test__(d, name) 
  File "/lib/python2.3/doctest.py", line 936, in 
run__test__ 
    raise TypeError("Tester.run__test__: values in " 
TypeError: Tester.run__test__: values in dict must be 
strings, functions or classes; <unbound method A.f> 


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=798254&group_id=5470



More information about the Python-bugs-list mailing list