Give a more informative message on an importlib test upon failure.

This commit is contained in:
Brett Cannon 2009-04-02 15:32:07 +00:00
parent 944820b044
commit 978259e9b3
1 changed files with 3 additions and 1 deletions

View 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>'