summaryrefslogtreecommitdiffstats
path: root/Lib/test/seq_tests.py
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2024-05-10 20:50:59 (GMT)
committerGitHub <noreply@github.com>2024-05-10 20:50:59 (GMT)
commitcceb758c788adb51ca1660e9d49410c2347feadc (patch)
tree1021c5c2a1f72b735988f614b9e7b3d545800646 /Lib/test/seq_tests.py
parentb3074f0d5ec4ead75ecce10bf7b7a1459cbf892e (diff)
downloadcpython-cceb758c788adb51ca1660e9d49410c2347feadc.zip
cpython-cceb758c788adb51ca1660e9d49410c2347feadc.tar.gz
cpython-cceb758c788adb51ca1660e9d49410c2347feadc.tar.bz2
[3.13] gh-118846: Fix free-threading test failures when run sequentially (GH-118864) (#118927)
The free-threaded build currently immortalizes some objects once the first thread is started. This can lead to test failures depending on the order in which tests are run. This PR addresses those failures by suppressing immortalization or skipping the affected tests. (cherry picked from commit b309c8ebff011f27012367b046ff92eecbdd68a5) Co-authored-by: Sam Gross <colesbury@gmail.com>
Diffstat (limited to 'Lib/test/seq_tests.py')
-rw-r--r--Lib/test/seq_tests.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/test/seq_tests.py b/Lib/test/seq_tests.py
index a41970d..719c943 100644
--- a/Lib/test/seq_tests.py
+++ b/Lib/test/seq_tests.py
@@ -426,6 +426,7 @@ class CommonTest(unittest.TestCase):
self.assertEqual(lst2, lst)
self.assertNotEqual(id(lst2), id(lst))
+ @support.suppress_immortalization()
def test_free_after_iterating(self):
support.check_free_after_iterating(self, iter, self.type2test)
support.check_free_after_iterating(self, reversed, self.type2test)