tests/run-tests.py
branchstable
changeset 799 c20c12c560dd
parent 798 bca8ef6e70b3
child 800 c4211177a2fc
equal deleted inserted replaced
798:bca8ef6e70b3 799:c20c12c560dd
   504     def rematch(el, l):
   504     def rematch(el, l):
   505         try:
   505         try:
   506             # hack to deal with graphlog, which looks like bogus regexes
   506             # hack to deal with graphlog, which looks like bogus regexes
   507             if el.startswith('|'):
   507             if el.startswith('|'):
   508                 el = '\\' + el
   508                 el = '\\' + el
   509             return re.match(el, l)
   509             # ensure that the regex matches to the end of the string
       
   510             return re.match(el + r'\Z', l)
   510         except re.error:
   511         except re.error:
   511             # el is an invalid regex
   512             # el is an invalid regex
   512             return False
   513             return False
   513 
   514 
   514     pos = -1
   515     pos = -1