Skip to content

Commit 02432ac

Browse files
author
Konrad Dysput
committed
Fix writing files to temp dir
1 parent 5c6d8e7 commit 02432ac

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tests/test_source_code_handler.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def test_collect_removes_unreadable_sources_without_runtime_error():
3838
def test_collect_keeps_readable_sources(tmp_path):
3939
"""Verify that readable source files are collected normally."""
4040
source_file = tmp_path / "real.py"
41-
source_file.write_text("foobarbaz")
41+
source_file.write_text(u"foobarbaz")
4242

4343
handler = SourceCodeHandler(tab_width=4, context_line_count=1)
4444
report = make_report([str(source_file)])
@@ -52,7 +52,7 @@ def test_collect_keeps_readable_sources(tmp_path):
5252
def test_collect_mixed_readable_and_unreadable(tmp_path):
5353
"""Mix of existing and missing files"""
5454
source_file = tmp_path / "exists.py"
55-
source_file.write_text("foobarbaz")
55+
source_file.write_text(u"foobarbaz")
5656

5757
handler = SourceCodeHandler(tab_width=4, context_line_count=3)
5858
report = make_report(

0 commit comments

Comments
 (0)