Set encoding correctly when opening files everywhere

Otherwise the encoding is interpreted differently on Windows and Mac.
This commit is contained in:
Ghostkeeper 2018-06-11 11:08:47 +02:00
parent c779795618
commit 54a03723ab
No known key found for this signature in database
GPG key ID: 5252B696FB5E7C7A
8 changed files with 13 additions and 13 deletions

View file

@ -19,7 +19,7 @@ import pytest
def test_ultimaker3extended_variants(um3_file, um3e_file):
directory = os.path.join(os.path.dirname(__file__), "..", "resources", "variants") #TODO: Hardcoded path relative to this test file.
um3 = configparser.ConfigParser()
um3.read_file(open(os.path.join(directory, um3_file)))
um3.read_file(open(os.path.join(directory, um3_file), encoding = "utf-8"))
um3e = configparser.ConfigParser()
um3e.read_file(open(os.path.join(directory, um3e_file)))
um3e.read_file(open(os.path.join(directory, um3e_file), encoding = "utf-8"))
assert um3["values"] == um3e["values"]