def test_that_input_is_stripped_first(self): text1 = 'a..bb' text2 = ' a..bb\t\n\t ' self.assertEqual(parse_changesets(text1), parse_changesets(text2))
def test_that_exception_is_raised(self): text = '123456.789012' # single dot is not recognized with self.assertRaises(ValueError): parse_changesets(text)
def test_that_two_or_three_dots_are_allowed(self): text1 = 'a..b' text2 = 'a...b' self.assertEqual(parse_changesets(text1), parse_changesets(text2))
def test_that_two_or_three_dots_are_allowed(self): text1 = 'a..b' text2 = 'a...b' self.assertEqual(parse_changesets(text1), parse_changesets(text2))
def test_start_is_returned_correctly(self): assert parse_changesets('aaabbb..') == { 'start': 'aaabbb', 'main': None, 'end': None, }
def test_end_is_returned_correctly(self): self.assertEqual(parse_changesets('..cccddd'), { 'start': None, 'main': None, 'end': 'cccddd', })
def test_non_alphanumeric_raises_exception(self): with self.assertRaises(ValueError): parse_changesets('aaa@bbb')
def test_start_is_returned_correctly(self): self.assertEqual(parse_changesets('aaabbb..'), { 'start': 'aaabbb', 'main': None, 'end': None, })
def test_that_input_is_stripped_first(self): text1 = 'a..bb' text2 = ' a..bb\t\n\t ' self.assertEqual(parse_changesets(text1), parse_changesets(text2))
def test_that_exception_is_raised(self): text = '123456.789012' # single dot is not recognized with self.assertRaises(ValueError): parse_changesets(text)
def test_that_input_is_stripped_first(self): text1 = 'a..bb' text2 = ' a..bb\t\n\t ' assert parse_changesets(text1) == parse_changesets(text2)
def test_that_two_or_three_dots_are_allowed(self): text1 = 'a..b' text2 = 'a...b' assert parse_changesets(text1) == parse_changesets(text2)
def test_end_is_returned_correctly(self): assert parse_changesets('..cccddd') == { 'start': None, 'main': None, 'end': 'cccddd', }
def test_non_alphanumeric_raises_exception(self): with self.assertRaises(ValueError): parse_changesets('aaa@bbb')
def test_main_is_returned_correctly(self): self.assertEqual(parse_changesets('123456'), { 'start': None, 'main': '123456', 'end': None, })
def test_main_is_returned_correctly(self): self.assertEqual(parse_changesets('123456'), { 'start': None, 'main': '123456', 'end': None, })
def test_start_is_returned_correctly(self): self.assertEqual(parse_changesets('aaabbb..'), { 'start': 'aaabbb', 'main': None, 'end': None, })
def test_end_is_returned_correctly(self): self.assertEqual(parse_changesets('..cccddd'), { 'start': None, 'main': None, 'end': 'cccddd', })
def test_main_is_returned_correctly(self): assert parse_changesets('123456') == { 'start': None, 'main': '123456', 'end': None, }