This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author belopolsky
Recipients
Date 2003-08-31.20:26:26
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
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> 
History
Date User Action Args
2007-08-23 14:16:35adminlinkissue798254 messages
2007-08-23 14:16:35admincreate