def test_of_range_address(self): expected=".AA11" self.assertEqual(of_range_address(of_column("AA"), of_row(11)).str, expected) expected="sheet.AA11" self.assertEqual(of_range_address("sheet", of_column("AA"), of_row(11)).str, expected) expected=".AA11:.BB22" self.assertEqual(of_range_address(of_column("AA"), of_row(11), of_column("BB"), of_row(22)).str, expected) expected="sheet.AA11:sheet2.BB22" self.assertEqual(of_range_address("sheet", of_column("AA"), of_row(11),"sheet2", of_column("BB"), of_row(22)).str, expected) expected=".AA11:.BB22" self.assertEqual(of_range_address(of_column("AA"), of_row(11), of_column("BB"), of_row(22)).str, expected) self.assertRaises(TypeError, of_range_address,"A", 1)
def test_of_row(self): self.assertEqual(of_row(55).str, "55") self.assertEqual(of_row("55", True).str, "$55") self.assertEqual(of_row(55, True).str, "$55") self.assertRaises(ValueError, of_row, "5A5") self.assertRaises(TypeError, of_row, 8.5)