def METHOD_NAME(self):
    """Test compiling invalid pattern raises re.error"""
    entity_name = 'test'
    pattern = '(invalid!'
    with self.assertRaises(re.error):
        RegexDetector(entity_name=entity_name, pattern=pattern)