def assertMatchesRegex(self, regex, string):
    """Assert that regex is found in string."""
    if not re.search(regex, string):
      self.fail("string %r did not match regex %r" % (string, regex))
dataset/ETHPy150Open google/transitfeed/tests/util.py/TestCase.assertMatchesRegex/original