--- doctest.py.orig 2003-07-16 15:25:22.000000000 -0400 +++ doctest.py 2003-08-31 16:58:55.000000000 -0400 @@ -302,6 +302,7 @@ from inspect import isclass as _isclass from inspect import isfunction as _isfunction +from inspect import ismethod as _ismethod from inspect import ismodule as _ismodule from inspect import classify_class_attrs as _classify_class_attrs @@ -930,12 +931,15 @@ thisname = prefix + k if type(v) in _StringTypes: f, t = self.runstring(v, thisname) - elif _isfunction(v) or _isclass(v): + elif _isfunction(v) \ + or _ismethod(v)\ + or _isclass(v): f, t = self.rundoc(v, thisname) else: raise TypeError("Tester.run__test__: values in " - "dict must be strings, functions " - "or classes; " + `v`) + "dict must be strings, functions, " + "methods or classes; got %s of type %s" + % (v, type(v))) failures = failures + f tries = tries + t finally: