def test_update_index(self): ws = Worksheet({}) ws.update_index(row=4, col=2, val=42) self.assertEqual(ws.size, [4, 2]) self.assertEqual(ws.index(4, 2), 42) self.assertEqual(ws.address('B4'), 42) self.assertEqual(ws.row(4)[1], 42) self.assertEqual(ws.col(2)[3], 42)
def test_ws_index(self): ws = Worksheet({'A1': {'v': 1}}) self.assertEqual(ws.index(row=1, col=1), 1) self.assertEqual(ws.index(1, 2), '')