summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-05-21 18:11:34 (GMT)
committerGuido van Rossum <guido@python.org>2007-05-21 18:11:34 (GMT)
commit813b0e5b6d53aff62ba1b3b69a8592e46687e093 (patch)
treec03dda2f735d80819695ee6499eaa4b11caa9f7a /Lib
parent2a857de62a8cfd12b494bd7f0fd4f94babc06c35 (diff)
downloadcpython-813b0e5b6d53aff62ba1b3b69a8592e46687e093.zip
cpython-813b0e5b6d53aff62ba1b3b69a8592e46687e093.tar.gz
cpython-813b0e5b6d53aff62ba1b3b69a8592e46687e093.tar.bz2
Make test_inspect pass once again.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/inspect.py2
-rw-r--r--Lib/test/test_inspect.py3
2 files changed, 3 insertions, 2 deletions
diff --git a/Lib/inspect.py b/Lib/inspect.py
index d2546f1..372013b 100644
--- a/Lib/inspect.py
+++ b/Lib/inspect.py
@@ -313,7 +313,7 @@ def getdoc(object):
doc = object.__doc__
except AttributeError:
return None
- if not isinstance(doc, types.StringTypes):
+ if not isinstance(doc, basestring):
return None
try:
lines = doc.expandtabs().split('\n')
diff --git a/Lib/test/test_inspect.py b/Lib/test/test_inspect.py
index 7919931..46e008a 100644
--- a/Lib/test/test_inspect.py
+++ b/Lib/test/test_inspect.py
@@ -3,6 +3,7 @@ import types
import unittest
import inspect
import datetime
+import collections
from test.test_support import TESTFN, run_unittest
@@ -60,7 +61,7 @@ class TestPredicates(IsTestBase):
self.istest(inspect.ismethod, 'git.argue')
self.istest(inspect.ismodule, 'mod')
self.istest(inspect.istraceback, 'tb')
- self.istest(inspect.isdatadescriptor, '__builtin__.file.closed')
+ self.istest(inspect.isdatadescriptor, 'collections.defaultdict.default_factory')
if hasattr(types, 'GetSetDescriptorType'):
self.istest(inspect.isgetsetdescriptor,
'type(tb.tb_frame).f_locals')