def test_read_northwest_out_of_bounds(self): cursor = Cursor([['A']]) cursor._position = (0, 0) self.assertIsNone(cursor.read(-1, -1))
def test_read_northwest_value(self): cursor = Cursor([['A']]) cursor._position = (1, 1) self.assertEqual(cursor.read(-1, -1), 'A')
def test_read_out_of_range(self): cursor = Cursor([[]]) self.assertIsNone(cursor.read())
def test_read_value(self): cursor = Cursor([[1]]) self.assertEqual(cursor.read(), 1)
def test_read_value_x_y(self): cursor = Cursor([[1], [2]]) cursor.advance_row() self.assertEqual(cursor.read(), 2)