add test case for repr(table)

This commit is contained in:
Chen Liu 2014-02-03 16:52:00 -05:00 committed by Stefan Wehrmeyer
parent 58a58912b7
commit c9cd4bf522

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'