Skip to content
Merged
Show file tree
Hide file tree
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
Next Next commit
Annotated failing/erroring tests in test_re & test_async_case + remov…
…ed SreFlag::TEMPLATE reference in `sre.rs`
  • Loading branch information
terryluan12 committed Jan 5, 2026
commit 53a290a8eff941313a4dfa6c1da0b4dc8a1faaa9
3 changes: 2 additions & 1 deletion Lib/test/test_re.py
Original file line number Diff line number Diff line change
Expand Up @@ -1755,6 +1755,7 @@ def test_bug_6561(self):
for x in not_decimal_digits:
self.assertIsNone(re.match(r'^\d$', x))

@unittest.expectedFailure # TODO: RUSTPYTHON a = array.array(typecode)\n ValueError: bad typecode (must be b, B, u, h, H, i, I, l, L, q, Q, f or d)
@warnings_helper.ignore_warnings(category=DeprecationWarning) # gh-80480 array('u')
def test_empty_array(self):
# SF buf 1647541
Expand Down Expand Up @@ -2654,6 +2655,7 @@ def test_bug_gh100061(self):
self.assertEqual(re.match("(?>(?:ab?c){1,3})", "aca").span(), (0, 2))
self.assertEqual(re.match("(?:ab?c){1,3}+", "aca").span(), (0, 2))

@unittest.expectedFailure # TODO: RUSTPYTHON; self.assertEqual(re.match('((x)|y|z){3}+', 'xyz').groups(), ('z', 'x'))\n AssertionError: Tuples differ: ('x', 'x') != ('z', 'x')
def test_bug_gh101955(self):
# Possessive quantifier with nested alternative with capture groups
self.assertEqual(re.match('((x)|y|z)*+', 'xyz').groups(), ('z', 'x'))
Expand Down Expand Up @@ -2897,7 +2899,6 @@ def test_long_pattern(self):
self.assertEqual(r[:30], "re.compile('Very long long lon")
self.assertEqual(r[-16:], ", re.IGNORECASE)")

@unittest.expectedFailure # TODO: RUSTPYTHON
def test_flags_repr(self):
self.assertEqual(repr(re.I), "re.IGNORECASE")
self.assertEqual(repr(re.I|re.S|re.X),
Expand Down
3 changes: 1 addition & 2 deletions Lib/test/test_unittest/test_async_case.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,8 +296,7 @@ async def on_cleanup2(self):
test.doCleanups()
self.assertEqual(events, ['asyncSetUp', 'test', 'asyncTearDown', 'cleanup2', 'cleanup1'])

# TODO: RUSTPYTHON
@unittest.expectedFailure
@unittest.skip('TODO: RUSTPYTHON')
def test_deprecation_of_return_val_from_test(self):
# Issue 41322 - deprecate return of value that is not None from a test
class Nothing:
Expand Down
1 change: 0 additions & 1 deletion crates/vm/src/stdlib/sre.rs
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,6 @@ mod _sre {
#[inline]
fn repr_str(zelf: &Py<Self>, vm: &VirtualMachine) -> PyResult<String> {
let flag_names = [
("re.TEMPLATE", SreFlag::TEMPLATE),
("re.IGNORECASE", SreFlag::IGNORECASE),
("re.LOCALE", SreFlag::LOCALE),
("re.MULTILINE", SreFlag::MULTILINE),
Expand Down