def test_range_text(self): address = pyoo.SheetAddress(0, 1, 2, 3) self.assertEqual('$B$1:$D$2', pyoo.text_type(address)) self.assertIsInstance(pyoo.text_type(address), pyoo.text_type)
def test_rectange_text(self): position = pyoo.SheetPosition(10, 20, 30, 40) self.assertEqual(u'x=10, y=20, width=30, height=40', pyoo.text_type(position)) self.assertIsInstance(pyoo.text_type(position), pyoo.text_type)
def test_cell_text(self): address = pyoo.SheetAddress(0, 1) self.assertEqual(u'$B$1', pyoo.text_type(address)) self.assertIsInstance(pyoo.text_type(address), pyoo.text_type)
def test_cell_text(self): cell = self.sheet[0,0] self.assertEqual(u'$A$1', pyoo.text_type(cell)) self.assertEqual(u'$A$1', pyoo.text_type(cell.address))
def test_point_text(self): position = pyoo.SheetPosition(10, 20) self.assertEqual(u'x=10, y=20', pyoo.text_type(position)) self.assertIsInstance(pyoo.text_type(position), pyoo.text_type)
def test_sheet_text(self): sheet = self.document.sheets[0] sheet.name = 'My Sheet' self.assertEqual(u'My Sheet', pyoo.text_type(sheet))
def test_cell_text(self): cell = self.sheet[0, 0] self.assertEqual(u'$A$1', pyoo.text_type(cell)) self.assertEqual(u'$A$1', pyoo.text_type(cell.address))