8000 Merge pull request #658 from mindw/win32_test_fix · pythonthings/github3.py@a334dbc · GitHub
[go: up one dir, main page]

Skip to content

Commit a334dbc

Browse files
authored
Merge pull request sigmavirus24#658 from mindw/win32_test_fix
fix tests failures on Win32.
2 parents a68b070 + 726ca53 commit a334dbc

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

AUTHORS.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,3 +140,5 @@ Contributors
140140
- Andreas Backx (@AndreasBackx)
141141

142142
- Alexander Koshelev <daevaorn@gmail.com>
143+
144+
- Gabi Davar (@mindw)

LATEST_VERSION_NOTES.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Unreleased
55

66
- Add ``Organization#all_events``.
77
- Deprecate ``Organization#events`` in favor of ``Organization#public_events``.
8+
- Fix test failtures on windows caused by unclosed file handles.
89

910
1.0.0a4: 2016-02-19
1011
~~~~~~~~~~~~~~~~~~~

tests/integration/test_repos_release.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,8 @@ def test_download(self):
135135
repository = self.gh.repository('sigmavirus24', 'github3.py')
136136
release = repository.release(76677)
137137
asset = next(release.assets())
138-
_, filename = tempfile.mkstemp()
138+
fd, filename = tempfile.mkstemp()
139+
os.close(fd)
139140
asset.download(filename)
140141

141142
with open(filename, 'rb') as fd:
@@ -153,7 +154,8 @@ def test_download_when_authenticated(self):
153154
repository = self.gh.repository('sigmavirus24', 'github3.py')
154155
release = repository.release(76677)
155156
asset = next(release.assets())
156-
_, filename = tempfile.mkstemp()
157+
fd, filename = tempfile.mkstemp()
158+
os.close(fd)
157159
assert asset.session.auth is not None
158160
asset.download(filename)
159161
assert asset.session.auth is not None

0 commit comments

Comments
 (0)
0