[Python-3000-checkins] r55493 - in python/branches/py3k-struni/Lib: inspect.py test/test_inspect.py

guido.van.rossum python-3000-checkins at python.org
Mon May 21 20:11:35 CEST 2007


Author: guido.van.rossum
Date: Mon May 21 20:11:34 2007
New Revision: 55493

Modified:
   python/branches/py3k-struni/Lib/inspect.py
   python/branches/py3k-struni/Lib/test/test_inspect.py
Log:
Make test_inspect pass once again.


Modified: python/branches/py3k-struni/Lib/inspect.py
==============================================================================
--- python/branches/py3k-struni/Lib/inspect.py	(original)
+++ python/branches/py3k-struni/Lib/inspect.py	Mon May 21 20:11:34 2007
@@ -313,7 +313,7 @@
         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')

Modified: python/branches/py3k-struni/Lib/test/test_inspect.py
==============================================================================
--- python/branches/py3k-struni/Lib/test/test_inspect.py	(original)
+++ python/branches/py3k-struni/Lib/test/test_inspect.py	Mon May 21 20:11:34 2007
@@ -3,6 +3,7 @@
 import unittest
 import inspect
 import datetime
+import collections
 
 from test.test_support import TESTFN, run_unittest
 
@@ -60,7 +61,7 @@
         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')


More information about the Python-3000-checkins mailing list