fix: os.open cannot handle file descriptors on python 2.x
This commit is contained in:
pare
ee687510b0
commit
f8ae581692
S'han modificat 1 arxius amb 1 adicions i 1 eliminacions
|
@ -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)
|
||||
|
|
Loading…
Referencia en una nova incidència