def _test(self, bef, aft): for pattern in ('{}', '+{}+'): b = pattern.format(bef) a = pattern.format(aft) self.assertEqual(string_preprocessor(b), a)
def _test(self, bef, aft): for pattern in ("{}", "+{}+"): b = pattern.format(bef) a = pattern.format(aft) assert string_preprocessor(b) == a