Skip to content

Commit

Permalink
Specify encoding for test files
Browse files Browse the repository at this point in the history
"utf-8" is not the default encoding on Windows, causing tests to fail
  • Loading branch information
Unrud committed Apr 21, 2018
1 parent 3e02134 commit ae8e10d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion radicale/tests/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@

def get_file_content(file_name):
try:
with open(os.path.join(EXAMPLES_FOLDER, file_name)) as fd:
with open(os.path.join(EXAMPLES_FOLDER, file_name),
encoding="utf-8") as fd:
return fd.read()
except IOError:
print("Couldn't open the file %s" % file_name)

0 comments on commit ae8e10d

Please sign in to comment.