Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update Lib/test/test_re.py
Co-authored-by: Serhiy Storchaka <[email protected]>
  • Loading branch information
Abhi210 and serhiy-storchaka authored Nov 4, 2025
commit f4f7d4db1f245d8a7574a1fbfa94af8e6392d543
2 changes: 1 addition & 1 deletion Lib/test/test_re.py
Original file line number Diff line number Diff line change
Expand Up @@ -1642,7 +1642,7 @@ def s_int(scanner, token): return int(token)
def test_bug_gh140797(self):
# gh140797: Capturing groups are not allowed in re.Scanner

msg = "Cannot use capturing groups in re.Scanner"
msg = r"Cannot use capturing groups in re\.Scanner"
# Capturing group throws an error
with self.assertRaisesRegex(ValueError, msg):
Scanner([("(a)b", None)])
Expand Down
Loading