We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cc63fa2 commit ad6af24Copy full SHA for ad6af24
1 file changed
Lib/test/test_code.py
@@ -1282,8 +1282,15 @@ class MyInt(int):
1282
@cpython_only
1283
def test__Py_DECLARE_STR_is_interned(self):
1284
for global_string in iter_global_strings():
1285
+ # compile given string to a codeobject
1286
+ global_string = eval(f"'{global_string}'")
1287
self.assertIsInterned(global_string)
1288
1289
+ @cpython_only
1290
+ def test_non_internable_strings_not_interned(self):
1291
+ self.assertIsNotInterned("not-internable")
1292
+ self.assertIsNotInterned("not.internable")
1293
+
1294
class CodeWeakRefTest(unittest.TestCase):
1295
1296
def test_basic(self):
0 commit comments