]> granicus.if.org Git - python/commitdiff
assertHasattr(): Made failure msg better than useless.
authorTim Peters <tim.peters@gmail.com>
Wed, 10 Jul 2002 02:37:21 +0000 (02:37 +0000)
committerTim Peters <tim.peters@gmail.com>
Wed, 10 Jul 2002 02:37:21 +0000 (02:37 +0000)
test_others():  httplib failed in two new ways.  Blame Thumb Boy <wink>.

Lib/test/test_pyclbr.py

index 0f3319f1a476df6cedd3931fe71f45bf5687591a..ce352afc4616cab86e50a6e3aebb28e94b3bcc88 100644 (file)
@@ -33,7 +33,8 @@ class PyclbrTest(unittest.TestCase):
         ''' succeed iff hasattr(obj,attr) or attr in ignore. '''
         if attr in ignore: return
         if not hasattr(obj, attr): print "???", attr
-        self.failUnless(hasattr(obj, attr))
+        self.failUnless(hasattr(obj, attr),
+                        'expected hasattr(%r, %r)' % (obj, attr))
 
 
     def assertHaskey(self, obj, key, ignore):
@@ -139,6 +140,8 @@ class PyclbrTest(unittest.TestCase):
         cm('aifc', ignore=('openfp',))    # set with =
 
         cm('httplib', ignore=('error',    # set with =
+                              'sendall',  # set with =
+                              '_closedsocket', # it's a nested class
                               'HTTPS',
                               'HTTP11'))   # not on all platforms