Skip to content

Commit f431f4d

Browse files
committed
fix: use UTF-8 encoding for Unicode test files on Windows
1 parent 1b79e43 commit f431f4d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/test_coverage_gaps.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ def test_yaml_with_special_unicode_nel(tmp_path):
302302
project.mkdir()
303303

304304
nel_char = "\u0085"
305-
(project / "nel_file.txt").write_text(f"line1{nel_char}line2")
305+
(project / "nel_file.txt").write_text(f"line1{nel_char}line2", encoding="utf-8")
306306

307307
tree = map_directory(project)
308308
yaml_output = to_yaml(tree)
@@ -323,8 +323,8 @@ def test_yaml_with_unicode_line_separators(tmp_path):
323323

324324
ls_char = "\u2028"
325325
ps_char = "\u2029"
326-
(project / "line_sep.txt").write_text(f"line1{ls_char}line2")
327-
(project / "para_sep.txt").write_text(f"para1{ps_char}para2")
326+
(project / "line_sep.txt").write_text(f"line1{ls_char}line2", encoding="utf-8")
327+
(project / "para_sep.txt").write_text(f"para1{ps_char}para2", encoding="utf-8")
328328

329329
tree = map_directory(project)
330330
yaml_output = to_yaml(tree)

0 commit comments

Comments
 (0)