'Throw an exception if the regular expresson pattern is not matched'

def assertNoMatch(self, pattern, string, msg=None):

    m = re.search(pattern, string)
    if (m and m.group(0)):
        raise self.failureException, (msg or '{0!r}    matches    {1!r}'.format(pattern, string))
