Example #1
0
 def _assert_fuzz_match(self, text, name_of_expected_contributor, expected_distance):
     committers = CommitterList()
     contributors, distance = committers.contributors_by_fuzzy_match(text)
     if type(name_of_expected_contributor) is list:
         expected_names = name_of_expected_contributor
     else:
         expected_names = [name_of_expected_contributor] if name_of_expected_contributor else []
     self.assertEqual(([contributor.full_name for contributor in contributors], distance), (expected_names, expected_distance))
 def _assert_fuzz_match(self, text, name_of_expected_contributor, expected_distance):
     committers = CommitterList()
     contributors, distance = committers.contributors_by_fuzzy_match(text)
     if type(name_of_expected_contributor) is list:
         expected_names = name_of_expected_contributor
     else:
         expected_names = [name_of_expected_contributor] if name_of_expected_contributor else []
     self.assertEqual(([contributor.full_name for contributor in contributors], distance), (expected_names, expected_distance))