mirror of
https://github.com/python/cpython.git
synced 2025-08-30 21:48:47 +00:00
gh-118846: Fix free-threading test failures when run sequentially (#118864)
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.
This commit is contained in:
parent
aa36f83c16
commit
b309c8ebff
8 changed files with 35 additions and 6 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue