diff options
| author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2024-05-09 20:34:22 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-09 20:34:22 (GMT) |
| commit | d4c6948340463e4da629822394b84921ff48c24f (patch) | |
| tree | 8364c359c4c408c5fb312f6a33cb6e37349c6fc0 /Lib/test/test_struct.py | |
| parent | 0a23970478a8e10476f4c3095060ef00e07826a2 (diff) | |
| download | cpython-d4c6948340463e4da629822394b84921ff48c24f.zip cpython-d4c6948340463e4da629822394b84921ff48c24f.tar.gz cpython-d4c6948340463e4da629822394b84921ff48c24f.tar.bz2 | |
[3.13] gh-118846: Fix PGO tests in free-threaded build (GH-118862) (#118867)
Avoid immortalizing objects in tests that verify garbage collection of
classes or modules.
This fixes test_ordered_dict and test_struct.
(cherry picked from commit 1b1db2fd9a531e26b79b34667bccfb938c4d184d)
Co-authored-by: Sam Gross <colesbury@gmail.com>
Diffstat (limited to 'Lib/test/test_struct.py')
| -rw-r--r-- | Lib/test/test_struct.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_struct.py b/Lib/test/test_struct.py index 15f6ee0..5508cc3 100644 --- a/Lib/test/test_struct.py +++ b/Lib/test/test_struct.py @@ -9,7 +9,7 @@ import sys import weakref from test import support -from test.support import import_helper +from test.support import import_helper, suppress_immortalization from test.support.script_helper import assert_python_ok ISBIGENDIAN = sys.byteorder == "big" @@ -674,6 +674,7 @@ class StructTest(unittest.TestCase): self.assertIn(b"Exception ignored in:", stderr) self.assertIn(b"C.__del__", stderr) + @suppress_immortalization() def test__struct_reference_cycle_cleaned_up(self): # Regression test for python/cpython#94207. |
