def test_does_not_recognize_correct_line(self): line = 'E|-----1---2---3---|----4---5---6---|' self.assertIsNone(INCORRECT_SPACING_REGEX.match(line))
def test_finds_incorrect_element(self): line = 'A|----1--2--3---|----456---' match = INCORRECT_SPACING_REGEX.match(line) self.assertIsNotNone(match) self.assertEqual(match.group('number_run'), '456')