def test_parser_version_regex(self): """Trivial parser test""" version = {'major': 1, 'minor': 0} txt = FORMAT_VERSION_HEADER_TEMPLATE % version res = FORMAT_VERSION_REGEXP.search(txt).groupdict() self.assertEqual(version['major'], int(res['major'])) self.assertEqual(version['minor'], int(res['minor']))
def test_parser_version_regex(self): """Trivial parser test""" version = {'major': 1, 'minor': 0} txt = FORMAT_VERSION_HEADER_TEMPLATE % version res = FORMAT_VERSION_REGEXP.search(txt).groupdict() self.assertEqual(version['major'], int(res['major'])) self.assertEqual(version['minor'], int(res['minor']))