diff options
author | Christian Stenger <christian.stenger@qt.io> | 2023-09-19 10:26:28 +0200 |
---|---|---|
committer | Christian Stenger <christian.stenger@qt.io> | 2023-09-19 08:59:23 +0000 |
commit | 383cfb77cc16cfb679f08930ba26cd95c0a84c42 (patch) | |
tree | 8c69f06a9b1df2d30f3622d1ee4f71e1f38fef7e | |
parent | 6cc11b21c5140ccf00b890e261718092c758a88b (diff) |
SquishTests: Fix writing test files on Windows
Writing the text test files without encoding can end up in
ANSI encoding of the files and in turn a fail when opening
as the file is treated read only until correct encoding is
used.
Change-Id: I9e21e240b3b02011a2266dfda1f1b453c3dad457
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
-rw-r--r-- | tests/system/suite_editors/tst_clean_whitespaces/test.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/system/suite_editors/tst_clean_whitespaces/test.py b/tests/system/suite_editors/tst_clean_whitespaces/test.py index 5c9e7aa6a6..7803027f86 100644 --- a/tests/system/suite_editors/tst_clean_whitespaces/test.py +++ b/tests/system/suite_editors/tst_clean_whitespaces/test.py @@ -89,7 +89,7 @@ def prepareFileExternal(fileName, content): test.log("Added trailing whitespace.") modifiedContent += currentLine - with open(fileName, "w") as f: + with open(fileName, "w", encoding="utf-8") as f: # used only with text files, so okay f.write(modifiedContent) if not emptyLine or not trailingWS: |