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

pull/109/head
codl 2017-11-27 16:34:48 +01:00
rodzic ee687510b0
commit f8ae581692
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 6CD7C8891ED1233A
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

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