def test_add_empty_string(self): self.assertEqual(add(""), 0)
def test_add_single_number(self): self.assertEqual(add("1"), 1)
def test_new_line_separator(self): self.assertEqual(add("1\n2,3"), 6)
def test_add_with_supplied_separator(self): self.assertEqual(add("//;\n1;2"), 3)
def test_add_comma_separated_numbers(self): self.assertEqual(add("1,2"), 3)
def test_unknown_number_of_arguments(self): self.assertEqual(add("1,2", "4,5"), 12) self.assertEqual(add("1,2", "4,5", ""), 12)
def test_empty_strings(): assert add("") == 0
def test_add_two_strings(): assert add("1,2") == 3
def test_numbers_bigger_than_thousand(): assert add('1002,3040,2339')
def test_handle_mulitple_delimeters(): assert add('//****\n1****2****3') == 6
def test_add_negative(): assert add('-1,-2,-3')
def test_handle_new_lines(): assert add('//;\n1,2,3')
def test_add_unknown_strings(): assert add("1,2,3,4") == 10