]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-110178: Use fewer weakrefs in test_typing.py (#110194)
authorJelle Zijlstra <jelle.zijlstra@gmail.com>
Mon, 2 Oct 2023 15:03:53 +0000 (08:03 -0700)
committerGitHub <noreply@github.com>
Mon, 2 Oct 2023 15:03:53 +0000 (08:03 -0700)
Confirmed that without the C changes from #108517, this test still segfaults with only 10 weakrefs.

Lib/test/test_typing.py

index 9e891f113840bef4205707d11ca960a975cc71c3..9559e35e9f02c1d0edfbe394696e40cc8565f358 100644 (file)
@@ -550,7 +550,7 @@ class TypeVarTests(BaseTestCase):
             with self.subTest(cls=cls):
                 vals = weakref.WeakValueDictionary()
 
-                for x in range(100000):
+                for x in range(10):
                     vals[x] = cls(str(x))
                 del vals