mirror of
https://github.com/python/cpython.git
synced 2025-12-09 10:37:17 +00:00
Make test_inspect pass once again.
This commit is contained in:
parent
2a857de62a
commit
813b0e5b6d
2 changed files with 3 additions and 2 deletions
|
|
@ -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')
|
||||
|
|
|
|||
|
|
@ -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')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue