From 14e539f0977aaf2768c58f1dcbbbab5ad0205ec5 Mon Sep 17 00:00:00 2001 From: Nikita Sobolev Date: Thu, 23 Nov 2023 01:55:25 +0300 Subject: [PATCH] gh-111809: Fix `test_deep_repr` from `test_userdict` on WASI (GH-112229) --- Lib/test/test_userdict.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Lib/test/test_userdict.py b/Lib/test/test_userdict.py index 483910aaa46..9a03f2d04ce 100644 --- a/Lib/test/test_userdict.py +++ b/Lib/test/test_userdict.py @@ -1,6 +1,6 @@ # Check every path through every method of UserDict -from test import mapping_tests +from test import mapping_tests, support import unittest import collections @@ -213,6 +213,11 @@ class G(collections.UserDict): else: self.fail("g[42] didn't raise KeyError") + # Decorate existing test with recursion limit, because + # the test is for C structure, but `UserDict` is a Python structure. + test_repr_deep = support.infinite_recursion()( + mapping_tests.TestHashMappingProtocol.test_repr_deep, + ) if __name__ == "__main__":