tests: Improve bytes python3 compatibility

This commit is contained in:
Tomas Babej 2019-01-01 20:11:13 -05:00
parent 7aac91f29f
commit 9b690fca57

View file

@ -464,7 +464,7 @@ def mkstemp(data):
pass pass
f = tempfile.NamedTemporaryFile(delete=False) f = tempfile.NamedTemporaryFile(delete=False)
f.write(data) f.write(data.encode('utf-8') if not isinstance(data, bytes) else data)
f.close() f.close()
# Ensure removal at end of python session # Ensure removal at end of python session