def METHOD_NAME(self):
    self.assertTrue(compare_values("hello world", "matches", "hello world"))
    self.assertTrue(compare_values("hello world", "matches", ".*world"))
    self.assertTrue(compare_values("uid=hello,cn=users,dc=test,dc=intranet", "matches",
                                   "uid=[^,]+,cn=users,dc=test,dc=intranet"))
    # only complete matches
    self.assertFalse(compare_values("hello world", "matches", "world"))
    self.assertFalse(compare_values("uid=hello,cn=users,dc=test,dc=intranet,dc=world", "matches",
                                    "uid=[^,]+,cn=users,dc=test,dc=intranet"))
    # supports more advanced regex features
    self.assertTrue(compare_values("hElLo WoRLd", "matches", "(?i)hello world( and stuff)?"))
    # raises errors on invalid patterns
    with self.assertRaises(CompareError):
        compare_values("hello world", "matches", "this is (invalid")
    # negation
    self.assertTrue(compare_values("uid=hello,cn=users,dc=test,dc=intranet", "!matches",
                                   "uid=[^,]+,cn=admins,dc=test,dc=intranet"))
    self.assertFalse(compare_values("uid=hello,cn=admins,dc=test,dc=intranet", "!matches",
                                    "uid=[^,]+,cn=admins,dc=test,dc=intranet"))