From f8ae58169231333100f291153d1ed32c8888be3a Mon Sep 17 00:00:00 2001 From: codl Date: Mon, 27 Nov 2017 16:34:48 +0100 Subject: fix: os.open cannot handle file descriptors on python 2.x --- tests/test_create_app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_create_app.py b/tests/test_create_app.py index 32f5994..5777caa 100644 --- a/tests/test_create_app.py +++ b/tests/test_create_app.py @@ -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) -- cgit v1.2.3