diff options
author | Guido van Rossum <guido@python.org> | 1997-10-08 04:05:08 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1997-10-08 04:05:08 (GMT) |
commit | 9ec2ed466b5c1430f4980fcf0af1fe5e46adb25c (patch) | |
tree | 7699766fe67113fb842d184bcb0fe29fc4f10995 /Lib/test | |
parent | 5bc5b14f6d01e11a8e10c3e937e7e83eff556178 (diff) | |
download | cpython-9ec2ed466b5c1430f4980fcf0af1fe5e46adb25c.zip cpython-9ec2ed466b5c1430f4980fcf0af1fe5e46adb25c.tar.gz cpython-9ec2ed466b5c1430f4980fcf0af1fe5e46adb25c.tar.bz2 |
Change test for re.sub() involving g<...> to use a multi-character
identifier. The previous re.py had a bug that wouldn't show up with
single-char identifier...
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_re.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_re.py b/Lib/test/test_re.py index 48ba503..d90e2a8 100644 --- a/Lib/test/test_re.py +++ b/Lib/test/test_re.py @@ -29,7 +29,7 @@ try: assert re.sub('(.)', re.escape(s), 'x') == s assert re.sub('(.)', lambda m: s, 'x') == s - assert re.sub('(?P<a>x)', '\g<a>\g<a>', 'xx') == 'xxxx' + assert re.sub('(?P<unk>x)', '\g<unk>\g<unk>', 'xx') == 'xxxx' assert re.sub('a', r'\t\n\v\r\f\a\b\B\Z\a\A\w\W\s\S\d\D', 'a') == '\t\n\v\r\f\a\bBZ\aAwWsSdD' assert re.sub('a', '\t\n\v\r\f\a', 'a') == '\t\n\v\r\f\a' |