@@ -2537,7 +2537,8 @@ def test_possessive_quantifiers(self):
25372537 self .assertIsNone (re .match ("^x{}+$" , "xxx" ))
25382538 self .assertTrue (re .match ("^x{}+$" , "x{}" ))
25392539
2540- @unittest .expectedFailure # TODO: RUSTPYTHON
2540+ # correction #7183 make it successful as in Cpython3.14
2541+ #@unittest.expectedFailure # TODO: RUSTPYTHON
25412542 def test_fullmatch_possessive_quantifiers (self ):
25422543 self .assertTrue (re .fullmatch (r'a++' , 'a' ))
25432544 self .assertTrue (re .fullmatch (r'a*+' , 'a' ))
@@ -2565,6 +2566,11 @@ def test_fullmatch_possessive_quantifiers(self):
25652566 self .assertTrue (re .fullmatch (r'(?:ab)?+c' , 'abc' ))
25662567 self .assertTrue (re .fullmatch (r'(?:ab){1,3}+c' , 'abc' ))
25672568
2569+ # added for test of correction #7183
2570+ def test_possessive_repeat (self ):
2571+ self .assertTrue (re .fullmatch ("([0-9]++(?:\.[0-9]+)*+)" , "1.25.38" ))
2572+ self .assertEqual (re .fullmatch ("([0-9]++(?:\.[0-9]+)*+)" , "1.25.38" ).groups ()[0 ], "1.25.38" )
2573+
25682574 def test_findall_possessive_quantifiers (self ):
25692575 self .assertEqual (re .findall (r'a++' , 'aab' ), ['aa' ])
25702576 self .assertEqual (re .findall (r'a*+' , 'aab' ), ['aa' , '' , '' ])
@@ -2590,7 +2596,8 @@ def test_atomic_grouping(self):
25902596 self .assertIsNone (re .match (r'(?>x)++x' , 'xxx' ))
25912597 self .assertIsNone (re .match (r'(?>x++)x' , 'xxx' ))
25922598
2593- @unittest .expectedFailure # TODO: RUSTPYTHON
2599+ # correction #7183 make it successful as in Cpython3.14
2600+ #@unittest.expectedFailure # TODO: RUSTPYTHON
25942601 def test_fullmatch_atomic_grouping (self ):
25952602 self .assertTrue (re .fullmatch (r'(?>a+)' , 'a' ))
25962603 self .assertTrue (re .fullmatch (r'(?>a*)' , 'a' ))
@@ -2629,7 +2636,8 @@ def test_findall_atomic_grouping(self):
26292636 self .assertEqual (re .findall (r'(?>(?:ab)?)' , 'ababc' ), ['ab' , 'ab' , '' , '' ])
26302637 self .assertEqual (re .findall (r'(?>(?:ab){1,3})' , 'ababc' ), ['abab' ])
26312638
2632- @unittest .expectedFailure # TODO: RUSTPYTHON
2639+ # correction #7183 make it success as in Cpython3.14
2640+ #@unittest.expectedFailure # TODO: RUSTPYTHON
26332641 def test_bug_gh91616 (self ):
26342642 self .assertTrue (re .fullmatch (r'(?s:(?>.*?\.).*)\z' , "a.txt" )) # reproducer
26352643 self .assertTrue (re .fullmatch (r'(?s:(?=(?P<g0>.*?\.))(?P=g0).*)\z' , "a.txt" ))
0 commit comments