Skip to content

Commit

Permalink
Make test_inspect pass once again.
Browse files Browse the repository at this point in the history
  • Loading branch information
gvanrossum committed May 21, 2007
1 parent 2a857de commit 813b0e5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Lib/inspect.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
3 changes: 2 additions & 1 deletion Lib/test/test_inspect.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import unittest
import inspect
import datetime
import collections

from test.test_support import TESTFN, run_unittest

Expand Down Expand Up @@ -60,7 +61,7 @@ def test_excluding_predicates(self):
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')
Expand Down

0 comments on commit 813b0e5

Please sign in to comment.