diff options
author | A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> | 2024-03-24 18:02:56 +0100 |
---|---|---|
committer | A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> | 2024-03-24 18:02:56 +0100 |
commit | 4933fa8bf5119e605e53f06a632cfabfcd991032 (patch) | |
tree | 0eb064aba5a7a044c0d9813dfb6df27ebe0d3001 /tests/python_build | |
parent | 99ff024f78f65ba0bc54fb409cfeca43ba2008fe (diff) | |
download | redot-engine-4933fa8bf5119e605e53f06a632cfabfcd991032.tar.gz |
[Buildsystem] Fix encoding when reading files
Diffstat (limited to 'tests/python_build')
-rw-r--r-- | tests/python_build/test_gles3_builder.py | 6 | ||||
-rw-r--r-- | tests/python_build/test_glsl_builder.py | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/tests/python_build/test_gles3_builder.py b/tests/python_build/test_gles3_builder.py index 861e0b84c4..6f16139eb9 100644 --- a/tests/python_build/test_gles3_builder.py +++ b/tests/python_build/test_gles3_builder.py @@ -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 diff --git a/tests/python_build/test_glsl_builder.py b/tests/python_build/test_glsl_builder.py index b9dcef48ac..348ef8441c 100644 --- a/tests/python_build/test_glsl_builder.py +++ b/tests/python_build/test_glsl_builder.py @@ -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 |