diff options
author | Abseil Team <absl-team@google.com> | 2019-11-25 10:29:35 (GMT) |
---|---|---|
committer | Gennadiy Rozental <rogeeff@google.com> | 2019-11-26 20:46:46 (GMT) |
commit | 51545ee515fc9f27de0edabc74d96300f43b2966 (patch) | |
tree | e3be1e2e724c1c00b0f41a4b68b02386a3a68fdb /googletest | |
parent | 679bfec6db73c021b0226e386c65ec1baee7a09f (diff) | |
download | googletest-51545ee515fc9f27de0edabc74d96300f43b2966.zip googletest-51545ee515fc9f27de0edabc74d96300f43b2966.tar.gz googletest-51545ee515fc9f27de0edabc74d96300f43b2966.tar.bz2 |
Googletest export
Make generating goldens work with Python 3
golden_file.write(output) fails with Python 3 with:
TypeError: a bytes-like object is required, not 'str'
PiperOrigin-RevId: 282316101
Diffstat (limited to 'googletest')
-rwxr-xr-x | googletest/test/googletest-output-test.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/googletest/test/googletest-output-test.py b/googletest/test/googletest-output-test.py index c727f17..093f6f9 100755 --- a/googletest/test/googletest-output-test.py +++ b/googletest/test/googletest-output-test.py @@ -331,7 +331,7 @@ if __name__ == '__main__': if CAN_GENERATE_GOLDEN_FILE: output = GetOutputOfAllCommands() golden_file = open(GOLDEN_PATH, 'wb') - golden_file.write(output) + golden_file.write(output.encode()) golden_file.close() else: message = ( |