diff options
-rw-r--r-- | Lib/test/test_sys.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_sys.py b/Lib/test/test_sys.py index a47a6bb..7866a5c 100644 --- a/Lib/test/test_sys.py +++ b/Lib/test/test_sys.py @@ -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() |