test: explicit encodings for open()
This commit is contained in:
parent
3703328751
commit
38d2ab685c
14 changed files with 63 additions and 61 deletions
|
|
@ -67,13 +67,13 @@ class TestMonitor(unittest.TestCase):
|
|||
|
||||
logfile = os.path.join(tmpdir, "log.txt")
|
||||
|
||||
with open(logfile, "w") as log, ObjectStore(storedir) as store:
|
||||
with open(logfile, "w", encoding="utf8") as log, ObjectStore(storedir) as store:
|
||||
monitor = LogMonitor(log.fileno())
|
||||
res = pipeline.run(store,
|
||||
monitor,
|
||||
libdir=os.path.abspath(os.curdir))
|
||||
|
||||
with open(logfile) as f:
|
||||
with open(logfile, encoding="utf8") as f:
|
||||
log = f.read()
|
||||
|
||||
assert res
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue