Skip to content
Open
Changes from all commits
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
4 changes: 2 additions & 2 deletions Lib/test/test_re.py
Original file line number Diff line number Diff line change
Expand Up @@ -1010,8 +1010,8 @@ def test_property_escapes(self):
with self.subTest(char=c):
self.assertEqual(bool(ci.fullmatch(c)), expect)
self.assertTrue(re.fullmatch(r'\p{Alphabetic=No}+', '123 '))
# These are engine categories, so (unlike \P of a multi-range
# property) they can be negated inside a character class.
# These are engine categories, so a negated one joins the set directly
# as a CATEGORY rather than being alternated in as a separate branch.
self.assertTrue(re.fullmatch(r'[\P{Alphabetic}]+', '123 .'))
self.assertTrue(re.fullmatch(r'[\p{XID_Start}_]+', 'foo_bar'))

Expand Down
Loading