Use assertIsInstance in tests.

Gives much nicer errors when it fails.
This commit is contained in:
Marc Tamlyn 2013-05-21 10:42:15 +01:00
parent 18856f866c
commit 09f8652765
31 changed files with 87 additions and 87 deletions

View file

@ -68,7 +68,7 @@ class TestUtilsSimpleLazyObject(TestCase):
# Second, for an evaluated SimpleLazyObject
name = x.name # evaluate
self.assertTrue(isinstance(x._wrapped, _ComplexObject))
self.assertIsInstance(x._wrapped, _ComplexObject)
# __repr__ contains __repr__ of wrapped object
self.assertEqual("<SimpleLazyObject: %r>" % x._wrapped, repr(x))