]> granicus.if.org Git - python/commitdiff
Give a more informative message on an importlib test upon failure.
authorBrett Cannon <bcannon@gmail.com>
Thu, 2 Apr 2009 15:32:07 +0000 (15:32 +0000)
committerBrett Cannon <bcannon@gmail.com>
Thu, 2 Apr 2009 15:32:07 +0000 (15:32 +0000)
Lib/importlib/test/source/test_abc_loader.py

index 0e7408d48de9776648a75115ce7e61492b07f780..a237a5ffebb3564afb26fd8712eab0060491dacc 100644 (file)
@@ -123,7 +123,9 @@ class PyLoaderTests(testing_abc.LoaderTests):
 
     def eq_attrs(self, ob, **kwargs):
         for attr, val in kwargs.items():
-            self.assertEqual(getattr(ob, attr), val)
+            found = getattr(ob, attr)
+            self.assertEqual(found, val,
+                    "{} attribute: {} != {}".format(attr, found, val))
 
     def test_module(self):
         name = '<module>'