diff options
author | codl <[email protected]> | 2017-11-27 16:34:48 +0100 |
---|---|---|
committer | codl <[email protected]> | 2017-11-27 16:35:12 +0100 |
commit | f8ae58169231333100f291153d1ed32c8888be3a (patch) | |
tree | bb501c932a57e02303cf8d65b63a50b11bbc77e7 /tests | |
parent | ee687510b0c00c28a6615044a61f0258e199bbac (diff) | |
download | mastodon.py-f8ae58169231333100f291153d1ed32c8888be3a.tar.gz |
fix: os.open cannot handle file descriptors on python 2.x
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_create_app.py | 2 |
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) |