Skip to content

Commit 903cc96

Browse files
fix tests
1 parent ad6af24 commit 903cc96

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Lib/test/test_code.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1280,13 +1280,15 @@ class MyInt(int):
12801280
self.assertEqual(code.co_consts[2], code.co_consts[3])
12811281

12821282
@cpython_only
1283+
@unittest.skipIf(Py_GIL_DISABLED, "free-threaded build interns all string constants")
12831284
def test__Py_DECLARE_STR_is_interned(self):
12841285
for global_string in iter_global_strings():
12851286
# compile given string to a codeobject
12861287
global_string = eval(f"'{global_string}'")
12871288
self.assertIsInterned(global_string)
12881289

12891290
@cpython_only
1291+
@unittest.skipIf(Py_GIL_DISABLED, "free-threaded build interns all string constants")
12901292
def test_non_internable_strings_not_interned(self):
12911293
self.assertIsNotInterned("not-internable")
12921294
self.assertIsNotInterned("not.internable")

0 commit comments

Comments
 (0)