Skip to content

Commit 1a2c8e2

Browse files
authored
Fix tests on latest Python 3.13 (and 3.12) (python#17849)
Related to python/cpython@c6c3d97 (python/cpython#121329), thanks to brianschubert for noticing
1 parent ca28425 commit 1a2c8e2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

mypyc/test-data/run-dicts.test

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,11 @@ else:
157157
try:
158158
clear_during_iter(d)
159159
except RuntimeError as e:
160-
assert str(e) == "OrderedDict changed size during iteration"
160+
assert str(e) in (
161+
"OrderedDict changed size during iteration",
162+
# Error message changed in Python 3.13 and some 3.12 patch version
163+
"OrderedDict mutated during iteration",
164+
)
161165
else:
162166
assert False
163167

0 commit comments

Comments
 (0)