use repr() to print extra / differing values in assertion comparison failures

and guard against failures in detail-representations

--HG--
branch : trunk
This commit is contained in:
holger krekel
2010-10-04 18:49:30 +02:00
parent f6da7ea0a5
commit 6892dc47a3
4 changed files with 71 additions and 27 deletions

View File

@@ -152,6 +152,9 @@ class TestSpecialisedExplanations(object):
def test_eq_set(self):
assert set([0, 10, 11, 12]) == set([0, 20, 21])
def test_eq_longer_list(self):
assert [1,2] == [1,2,3]
def test_in_list(self):
assert 1 in [0, 2, 3, 4, 5]