add test case for repr(table)

This commit is contained in:
Chen Liu
2014-02-04 09:24:38 +01:00
committed by Stefan Wehrmeyer
parent 58a58912b7
commit c9cd4bf522
+3
View File
@@ -184,6 +184,9 @@ class TableTestCase(unittest.TestCase):
assert self.tbl.delete() is True, 'should return non zero'
assert len(self.tbl) == 0, len(self.tbl)
def test_repr(self):
assert repr(self.tbl) == '<Table(weather)>', 'the representation should be <Table(weather)>'
def test_delete_nonexist_entry(self):
assert self.tbl.delete(place='Berlin') is False, 'entry not exist, should fail to delete'