8000 Update the integration test for PullFile#download · adrianmoisey/github3.py@c546170 · GitHub
[go: up one dir, main page]

Skip to content

Commit c546170

Browse files
committed
Update the integration test for PullFile#download
1 parent da391d3 commit c546170

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

tests/integration/test_pulls.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# -*- coding: utf-8 -*-
22
"""Integration tests for methods implemented on PullRequest."""
3-
import os
4-
import os.path
3+
import tempfile
54

65
import github3
76

@@ -146,7 +145,6 @@ def test_download(self):
146145
else:
147146
assert False, "Could not find 'github3/pulls.py'"
148147

149-
filename = pull_file.download()
150-
151-
assert os.path.exists(filename)
152-
os.unlink(filename)
148+
with tempfile.NamedTemporaryFile() as fd:
149+
filename = pull_file.download(fd)
150+
assert filename is not None

0 commit comments

Comments
 (0)
0