mirror of
https://github.com/python/cpython.git
synced 2025-09-28 03:13:48 +00:00
bpo-32030: Fix test_sys.test_getallocatedblocks() (#4637)
Skip the test if PYTHONMALLOC environment variable is set.
This commit is contained in:
parent
23cc8c0f9e
commit
06be9daf6f
1 changed files with 4 additions and 0 deletions
|
@ -778,6 +778,10 @@ class SysModuleTest(unittest.TestCase):
|
|||
@unittest.skipUnless(hasattr(sys, "getallocatedblocks"),
|
||||
"sys.getallocatedblocks unavailable on this build")
|
||||
def test_getallocatedblocks(self):
|
||||
if (os.environ.get('PYTHONMALLOC', None)
|
||||
and not sys.flags.ignore_environment):
|
||||
self.skipTest("cannot test if PYTHONMALLOC env var is set")
|
||||
|
||||
# Some sanity checks
|
||||
with_pymalloc = sysconfig.get_config_var('WITH_PYMALLOC')
|
||||
a = sys.getallocatedblocks()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue