We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9b081af commit 52e1b70Copy full SHA for 52e1b70
pkg_resources/tests/test_pkg_resources.py
@@ -111,13 +111,13 @@ def test_resource_filename_rewrites_on_change(self):
111
filename = zp.get_resource_filename(manager, 'data.dat')
112
actual = datetime.datetime.fromtimestamp(os.stat(filename).st_mtime)
113
assert actual == self.ref_time
114
- f = open(filename, 'w')
+ f = open(filename, 'w', encoding="utf-8")
115
f.write('hello, world?')
116
f.close()
117
ts = self.ref_time.timestamp()
118
os.utime(filename, (ts, ts))
119
120
- with open(filename) as f:
+ with open(filename, encoding="utf-8") as f:
121
assert f.read() == 'hello, world!'
122
manager.cleanup_resources()
123
0 commit comments