summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_tracemalloc.py
diff options
context:
space:
mode:
authorPablo Galindo Salgado <Pablogsal@gmail.com>2024-04-26 20:23:30 (GMT)
committerGitHub <noreply@github.com>2024-04-26 20:23:30 (GMT)
commitb43c7e1070e515b3e94043ff777ab83074234051 (patch)
tree5fd2ffec3896c4d2cad8b2a496da9400911b77d6 /Lib/test/test_tracemalloc.py
parent5a90de0d4cbc151a6deea36a27eb81b192410e56 (diff)
downloadcpython-b43c7e1070e515b3e94043ff777ab83074234051.zip
cpython-b43c7e1070e515b3e94043ff777ab83074234051.tar.gz
cpython-b43c7e1070e515b3e94043ff777ab83074234051.tar.bz2
gh-112730: Respect tests that require environment variables with no-colorize fixes (#118288)
Diffstat (limited to 'Lib/test/test_tracemalloc.py')
-rw-r--r--Lib/test/test_tracemalloc.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/test/test_tracemalloc.py b/Lib/test/test_tracemalloc.py
index f685430..5755f76 100644
--- a/Lib/test/test_tracemalloc.py
+++ b/Lib/test/test_tracemalloc.py
@@ -8,6 +8,7 @@ from test.support.script_helper import (assert_python_ok, assert_python_failure,
interpreter_requires_environment)
from test import support
from test.support import os_helper
+from test.support import force_not_colorized
try:
import _testcapi
@@ -938,11 +939,12 @@ class TestCommandLine(unittest.TestCase):
stdout = stdout.rstrip()
self.assertEqual(stdout, b'10')
+ @force_not_colorized
def check_env_var_invalid(self, nframe):
with support.SuppressCrashReport():
ok, stdout, stderr = assert_python_failure(
'-c', 'pass',
- PYTHONTRACEMALLOC=str(nframe), __cleanenv=True)
+ PYTHONTRACEMALLOC=str(nframe))
if b'ValueError: the number of frames must be in range' in stderr:
return