Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit96bd499

Browse files
committed
gh-117174: Respect tests that require environment variables with no-colorize fixes
1 parent5da0280 commit96bd499

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

‎Lib/test/test_traceback.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,7 @@ def f():
384384
])
385385

386386
@requires_subprocess()
387+
@force_not_colorized
387388
deftest_encoded_file(self):
388389
# Test that tracebacks are correctly printed for encoded source files:
389390
# - correct line number (Issue2384)
@@ -410,7 +411,7 @@ def do_test(firstlines, message, charset, lineno):
410411
""".format(firstlines,message))
411412

412413
process=subprocess.Popen([sys.executable,TESTFN],
413-
stdout=subprocess.PIPE,stderr=subprocess.STDOUT,env={})
414+
stdout=subprocess.PIPE,stderr=subprocess.STDOUT)
414415
stdout,stderr=process.communicate()
415416
stdout=stdout.decode(output_encoding).splitlines()
416417
finally:

‎Lib/test/test_tracemalloc.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
interpreter_requires_environment)
99
fromtestimportsupport
1010
fromtest.supportimportos_helper
11+
fromtest.supportimportforce_not_colorized
1112

1213
try:
1314
import_testcapi
@@ -938,11 +939,12 @@ def test_env_limit(self):
938939
stdout=stdout.rstrip()
939940
self.assertEqual(stdout,b'10')
940941

942+
@force_not_colorized
941943
defcheck_env_var_invalid(self,nframe):
942944
withsupport.SuppressCrashReport():
943945
ok,stdout,stderr=assert_python_failure(
944946
'-c','pass',
945-
PYTHONTRACEMALLOC=str(nframe),__cleanenv=True)
947+
PYTHONTRACEMALLOC=str(nframe))
946948

947949
ifb'ValueError: the number of frames must be in range'instderr:
948950
return

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp