(self, dictcls)
| 1221 | reason="CPython 3.12 internal changes prevent testing for recursion issues this way", |
| 1222 | ) |
| 1223 | def test_dict_cyclic_recursion(self, dictcls): |
| 1224 | depth = 50 |
| 1225 | typ = Dict[str, int] |
| 1226 | for _ in range(depth): |
| 1227 | typ = Dict[str, typ] |
| 1228 | |
| 1229 | class Cache(Struct): |
| 1230 | value: typ |
| 1231 | |
| 1232 | msgspec.json.Decoder(Cache) |
| 1233 | |
| 1234 | map = dictcls() |
| 1235 | map["x"] = map |
| 1236 | msg = {"value": map} |
| 1237 | |
| 1238 | with pytest.raises(RecursionError): |
| 1239 | with max_call_depth(5): |
| 1240 | convert(msg, Cache) |
| 1241 | |
| 1242 | def test_dict_constrs(self, dictcls): |
| 1243 | class Ex(Struct): |
nothing calls this directly
no test coverage detected