From 9fe0249a72cc9c0a9562370bd31e304ed79026d0 Mon Sep 17 00:00:00 2001 From: hauntsaninja Date: Sat, 28 Sep 2024 13:21:17 -0700 Subject: [PATCH] Fix tests on latest Python 3.13 Related to python/cpython@c6c3d970ba54f4ad4c4151bb262cef96d3299480 (python/cpython#121329), thanks to brianschubert for noticing --- mypyc/test-data/run-dicts.test | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mypyc/test-data/run-dicts.test b/mypyc/test-data/run-dicts.test index 58b862e3f303..d4f5b945309e 100644 --- a/mypyc/test-data/run-dicts.test +++ b/mypyc/test-data/run-dicts.test @@ -157,7 +157,11 @@ else: try: clear_during_iter(d) except RuntimeError as e: - assert str(e) == "OrderedDict changed size during iteration" + assert str(e) in ( + "OrderedDict changed size during iteration", + # Error message changed in Python 3.13 and some 3.12 patch version + "OrderedDict mutated during iteration", + ) else: assert False