def test_if_wrong_number_of_digits_raises_value_error(self): with self.assertRaises(ValueError): generate_account_line([1, 2, 3, 4, 5, 6, 7, 8, 9, 0])
def test_line_on_second_illegal_account(self): self.assertEqual(generate_account_line([-1, -2, -3, -4, -5, -6, -7, -8, -9]), "????????? ILL")
def test_if_invalid_input_raises_value_error(self): with self.assertRaises(TypeError): generate_account_line(("a", "b", "c"))
def test_line_on_illegal_account(self): self.assertEqual(generate_account_line([4, 5, 1, 3, -1, -1, 0, 8, 2]), "4513??082 ILL")
def test_line_on_second_invalid_account(self): self.assertEqual(generate_account_line([1, 1, 1, 1, 1, 1, 1, 1, 1]), "111111111 ERR")
def test_line_on_invalid_account(self): self.assertEqual(generate_account_line([1, 2, 3, 4, 5, 6, 7, 8, 9]), "123456789 ERR")
def test_line_on_second_valid_account(self): self.assertEqual(generate_account_line([0, 1, 1, 2, 0, 0, 7, 0, 9]), "011200709")
def test_line_on_valid_account(self): self.assertEqual(generate_account_line([4, 5, 7, 5, 0, 8, 1, 0, 0]), "457508100")