def test_errors(self): with self.assertRaises(ValueError): address_to_index('100') with self.assertRaises(ValueError): address_to_index('A') with self.assertRaises(ValueError): address_to_index('A1A')
def test_errors(self): with self.assertRaises(ValueError): address_to_index("100") with self.assertRaises(ValueError): address_to_index("A") with self.assertRaises(ValueError): address_to_index("A1A")
def test_CCC100(self): self.assertEqual(address_to_index("CCC100"), (99, 2108))
def test_AA100(self): self.assertEqual(address_to_index("AA100"), (99, 26))
def test_C2(self): self.assertEqual(address_to_index("C2"), (1, 2))
def test_A2(self): self.assertEqual(address_to_index("A2"), (1, 0))
def test_lowercase_a1(self): self.assertEqual(address_to_index("a1"), (0, 0))
def test_A1(self): self.assertEqual(address_to_index("A1"), (0, 0))
def test_CCC100(self): self.assertEqual(address_to_index('CCC100'), (99, 2108))
def test_AA100(self): self.assertEqual(address_to_index('AA100'), (99, 26))
def test_C2(self): self.assertEqual(address_to_index('C2'), (1, 2))
def test_A2(self): self.assertEqual(address_to_index('A2'), (1, 0))
def test_lowercase_a1(self): self.assertEqual(address_to_index('a1'), (0, 0))
def test_A1(self): self.assertEqual(address_to_index('A1'), (0, 0))