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_column(self): self.assertEqual(of_column("AB").str, "AB") self.assertEqual(of_column("AB", True).str, "$AB") self.assertRaises(ValueError, of_column, "A1B") self.assertRaises(TypeError, of_column, 8)