Test: set encoding to utf-8 in TestMetadata.test_file_path

This commit is contained in:
wmayer
2022-06-29 12:28:02 +02:00
parent 22829f8a24
commit 82bbe47d68

View File

@@ -111,7 +111,7 @@ class TestMetadata(unittest.TestCase):
def test_file_path(self):
# Issue 7112
filename = os.path.join(tempfile.gettempdir(), b'H\xc3\xa5vard.xml'.decode("utf-8"))
xmlfile = open(filename, "w")
xmlfile = open(file=filename, mode="w", encoding="utf-8")
xmlfile.write(r"""<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<package format="1" xmlns="https://wiki.freecad.org/Package_Metadata">
<name>test</name>