Merge "Show expected output in test-case error"

This commit is contained in:
Jenkins 2014-06-22 16:02:27 +00:00 committed by Gerrit Code Review
commit 653955efda

View File

@ -65,7 +65,11 @@ class AllocatorTestCase(BaseTestCase):
for i, amount in enumerate(self.results):
print self.agt[i]
for i, amount in enumerate(self.results):
self.assertEqual(self.agt[i].amount, amount)
self.assertEqual(self.agt[i].amount, amount,
'Error at pos %d, '
'expected %s and got %s' % (i, self.results,
[x.amount
for x in self.agt]))
class MySQLSchemaFixture(fixtures.Fixture):