Mercurial > hg
comparison tests/run-tests.py @ 44021:6d3b67a837a6
cleanup: drop redundant character escapes from `[]` character sets
Flagged by PyCharm. Most special characters lose their special meaning inside
square brackets. The `-` in util.py doesn't need to be escaped because it is
the last character in the set.
Differential Revision: https://phab.mercurial-scm.org/D7766
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Sat, 28 Dec 2019 01:35:05 -0500 |
parents | bd3fa45c0662 |
children | bd0de73cf810 9803b374389a |
comparison
equal
deleted
inserted
replaced
44020:ac3cb5e05a38 | 44021:6d3b67a837a6 |
---|---|
3177 expanded_args.extend([arg + a for a in os.listdir(arg)]) | 3177 expanded_args.extend([arg + a for a in os.listdir(arg)]) |
3178 else: | 3178 else: |
3179 expanded_args.append(arg) | 3179 expanded_args.append(arg) |
3180 args = expanded_args | 3180 args = expanded_args |
3181 | 3181 |
3182 testcasepattern = re.compile( | 3182 testcasepattern = re.compile(br'([\w-]+\.t|py)(?:#([a-zA-Z0-9_\-.#]+))') |
3183 br'([\w-]+\.t|py)(?:#([a-zA-Z0-9_\-\.#]+))' | |
3184 ) | |
3185 tests = [] | 3183 tests = [] |
3186 for t in args: | 3184 for t in args: |
3187 case = [] | 3185 case = [] |
3188 | 3186 |
3189 if not ( | 3187 if not ( |