fix: os.open cannot handle file descriptors on python 2.x

This commit is contained in:
codl 2017-11-27 16:34:48 +01:00
pare ee687510b0
commit f8ae581692
No se encontró ninguna clave conocida en la base de datos para esta firma
ID de clave GPG: 6CD7C8891ED1233A

Veure arxiu

@ -31,7 +31,7 @@ def test_create_app_to_file(mocker):
(fd, filename) = tempfile.mkstemp(text=True) (fd, filename) = tempfile.mkstemp(text=True)
test_create_app(mocker, to_file=filename) test_create_app(mocker, to_file=filename)
with open(fd) as f: with os.fdopen(fd) as f:
assert f.read() == "foo\nbar\n" assert f.read() == "foo\nbar\n"
os.remove(filename) os.remove(filename)