@@ -43,10 +43,10 @@ def comparator_tmpdir(tmp_pathplus):
43
43
fn = "FiLe" # Verify case-insensitive comparison
44
44
else :
45
45
fn = "file"
46
- with open (os .path .join (dir , fn ), 'w' ) as output :
46
+ with open (os .path .join (dir , fn ), 'w' , encoding = "UTF-8" ) as output :
47
47
output .write ('Contents of file go here.\n ' )
48
48
49
- with open (os .path .join (data .dir_diff , "file2" ), 'w' ) as output :
49
+ with open (os .path .join (data .dir_diff , "file2" ), 'w' , encoding = "UTF-8" ) as output :
50
50
output .write ('An extra file.\n ' )
51
51
52
52
return data
@@ -85,7 +85,7 @@ def test_cmpfiles(self, comparator_tmpdir):
85
85
), "Comparing directory to same fails"
86
86
87
87
# Add different file2
88
- with open (os .path .join (comparator_tmpdir .dir , "file2" ), 'w' ) as output :
88
+ with open (os .path .join (comparator_tmpdir .dir , "file2" ), 'w' , encoding = "UTF-8" ) as output :
89
89
output .write ('Different contents.\n ' )
90
90
91
91
assert filecmp .cmpfiles (
@@ -174,7 +174,7 @@ def test_dircmp(self, comparator_tmpdir):
174
174
self ._assert_report (d .report , expected_report )
175
175
176
176
# Add different file2
177
- with open (os .path .join (comparator_tmpdir .dir_diff , "file2" ), 'w' ) as output :
177
+ with open (os .path .join (comparator_tmpdir .dir_diff , "file2" ), 'w' , encoding = "UTF-8" ) as output :
178
178
output .write ('Different contents.\n ' )
179
179
d = DirComparator (comparator_tmpdir .dir , comparator_tmpdir .dir_diff )
180
180
assert d .same_files == ["file" ]
0 commit comments