gh-123990: Good bye WITH_FREELISTS macro (gh-124358)

This commit is contained in:
Donghee Na 2024-09-23 18:28:59 -07:00 committed by GitHub
parent be76e3f26e
commit ad7c778546
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 4 additions and 100 deletions

View file

@ -1042,14 +1042,10 @@ class SysModuleTest(unittest.TestCase):
# Output of sys._debugmallocstats() depends on configure flags.
# The sysconfig vars are not available on Windows.
if sys.platform != "win32":
with_freelists = sysconfig.get_config_var("WITH_FREELISTS")
with_pymalloc = sysconfig.get_config_var("WITH_PYMALLOC")
if with_freelists:
self.assertIn(b"free PyDictObjects", err)
self.assertIn(b"free PyDictObjects", err)
if with_pymalloc:
self.assertIn(b'Small block threshold', err)
if not with_freelists and not with_pymalloc:
self.assertFalse(err)
# The function has no parameter
self.assertRaises(TypeError, sys._debugmallocstats, True)