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.

classification
Title: doctest crash
Type: Stage:
Components: Library (Lib) Versions: Python 2.3
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: rhettinger Nosy List: belopolsky, rhettinger
Priority: normal Keywords:

Created on 2003-08-31 20:26 by belopolsky, last changed 2022-04-10 16:10 by admin. This issue is now closed.

Messages (2)
msg18028 - (view) Author: Alexander Belopolsky (belopolsky) * (Python committer) Date: 2003-08-31 20:26
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> 
msg18029 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2003-09-02 02:15
Logged In: YES 
user_id=80475

Applied patch #798269
History
Date User Action Args
2022-04-10 16:10:55adminsetgithub: 39159
2003-08-31 20:26:26belopolskycreate