summaryrefslogtreecommitdiff
path: root/tests/scanner/test_transformer.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/scanner/test_transformer.py')
-rw-r--r--tests/scanner/test_transformer.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/scanner/test_transformer.py b/tests/scanner/test_transformer.py
index c6fbf4e7..3feed441 100644
--- a/tests/scanner/test_transformer.py
+++ b/tests/scanner/test_transformer.py
@@ -18,7 +18,7 @@ def create_scanner_from_source_string(source):
tmp_fd, tmp_name = tempfile.mkstemp(suffix='.h', text=True)
try:
- with os.fdopen(tmp_fd, 'wt') as file:
+ with os.fdopen(tmp_fd, 'w', encoding='utf-8') as file:
file.write(source)
ss.parse_files([tmp_name])
finally: