Lines Matching refs:escape
56 self.assertEqual(re.sub('(.)', re.escape(s), 'x'), s)
73 # fails for group followed by other escape
508 self.assertEqual(re.escape(c), c)
510 self.assertEqual(re.escape(c), u'\\000')
512 self.assertEqual(re.escape(c), u'\\' + c)
513 self.assertMatch(re.escape(c), c)
514 self.assertMatch(re.escape(p), p)
521 self.assertEqual(re.escape(b), b)
523 self.assertEqual(re.escape(b), b'\\000')
525 self.assertEqual(re.escape(b), b'\\' + b)
526 self.assertMatch(re.escape(b), b)
527 self.assertMatch(re.escape(p), p)
531 s_escaped = re.escape(s)
534 self.assertMatch(u'.%s+.' % re.escape(u'\u2620'), s,
539 b_escaped = re.escape(b)
542 res = re.findall(re.escape(u'\u2620'.encode('utf-8')), b)
622 pat=u"["+re.escape(u"\u2039")+u"]"