aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcodl <[email protected]>2017-11-27 16:34:48 +0100
committercodl <[email protected]>2017-11-27 16:35:12 +0100
commitf8ae58169231333100f291153d1ed32c8888be3a (patch)
treebb501c932a57e02303cf8d65b63a50b11bbc77e7
parentee687510b0c00c28a6615044a61f0258e199bbac (diff)
downloadmastodon.py-f8ae58169231333100f291153d1ed32c8888be3a.tar.gz
fix: os.open cannot handle file descriptors on python 2.x
-rw-r--r--tests/test_create_app.py2
1 files changed, 1 insertions, 1 deletions
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):
31 (fd, filename) = tempfile.mkstemp(text=True) 31 (fd, filename) = tempfile.mkstemp(text=True)
32 32
33 test_create_app(mocker, to_file=filename) 33 test_create_app(mocker, to_file=filename)
34 with open(fd) as f: 34 with os.fdopen(fd) as f:
35 assert f.read() == "foo\nbar\n" 35 assert f.read() == "foo\nbar\n"
36 36
37 os.remove(filename) 37 os.remove(filename)
Powered by cgit v1.2.3 (git 2.41.0)