1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

[Buildsystem] Fix encoding when reading files

This commit is contained in:
A Thousand Ships
2024-03-24 18:02:56 +01:00
parent 99ff024f78
commit 4933fa8bf5
10 changed files with 24 additions and 24 deletions

View File

@@ -17,15 +17,15 @@ def test_gles3_builder(shader_files, builder, header_struct):
builder(shader_files["path_input"], "drivers/gles3/shader_gles3.h", "GLES3", header_data=header)
with open(shader_files["path_expected_parts"], "r") as f:
with open(shader_files["path_expected_parts"], "r", encoding="utf-8") as f:
expected_parts = json.load(f)
assert expected_parts == header.__dict__
with open(shader_files["path_output"], "r") as f:
with open(shader_files["path_output"], "r", encoding="utf-8") as f:
actual_output = f.read()
assert actual_output
with open(shader_files["path_expected_full"], "r") as f:
with open(shader_files["path_expected_full"], "r", encoding="utf-8") as f:
expected_output = f.read()
assert actual_output == expected_output

View File

@@ -23,15 +23,15 @@ def test_glsl_builder(shader_files, builder, header_struct):
header = header_struct()
builder(shader_files["path_input"], header_data=header)
with open(shader_files["path_expected_parts"], "r") as f:
with open(shader_files["path_expected_parts"], "r", encoding="utf-8") as f:
expected_parts = json.load(f)
assert expected_parts == header.__dict__
with open(shader_files["path_output"], "r") as f:
with open(shader_files["path_output"], "r", encoding="utf-8") as f:
actual_output = f.read()
assert actual_output
with open(shader_files["path_expected_full"], "r") as f:
with open(shader_files["path_expected_full"], "r", encoding="utf-8") as f:
expected_output = f.read()
assert actual_output == expected_output