From a14e75d7ca7a2879af6f45222fae503cf63bbc66 Mon Sep 17 00:00:00 2001 From: Mike McKerns Date: Mon, 9 Sep 2024 18:54:11 -0400 Subject: [PATCH] account for frame.f_locals as proxy in 3.13 (#677) --- dill/tests/test_detect.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dill/tests/test_detect.py b/dill/tests/test_detect.py index 342cc1ac..5ab16bb4 100644 --- a/dill/tests/test_detect.py +++ b/dill/tests/test_detect.py @@ -29,7 +29,8 @@ def test_bad_things(): s = set([(err.__class__.__name__,err.args[0]) for err in list(errors(f, 1).values())]) a = dict(s) if not os.environ.get('COVERAGE'): #XXX: travis-ci - assert len(s) is len(a) # TypeError (and possibly PicklingError) + proxy = 0 if type(f.f_locals) is dict else 1 + assert len(s) == len(a) + proxy # TypeError (and possibly PicklingError) n = 2 assert len(a) is n if 'PicklingError' in a.keys() else n-1