fix: Python 3 crash in googletest-output-test.py debug mode

Fixes #3943

Change file open mode from 'wb' (binary) to 'w' (text) when writing
normalized output in DEBUG_GTEST_OUTPUT_TEST mode.
This commit is contained in:
Manikandan K. S. 2026-07-11 19:33:21 +05:30
parent 8240fa7d62
commit 86ec940f63

View File

@ -349,14 +349,14 @@ class GTestOutputTest(gtest_test_utils.TestCase):
gtest_test_utils.GetSourceDir(),
'_googletest-output-test_normalized_actual.txt',
),
'wb',
'w',
).write(normalized_actual)
open(
os.path.join(
gtest_test_utils.GetSourceDir(),
'_googletest-output-test_normalized_golden.txt',
),
'wb',
'w',
).write(normalized_golden)
self.assertEqual(normalized_golden, normalized_actual)