Skip to content

Commit 6d99f49

Browse files
committed
close fd for windows
1 parent e424f68 commit 6d99f49

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

tests/test_magic.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -198,13 +198,14 @@ def test_magic_parse_long_options():
198198
def doctest_hist_f():
199199
"""Test %hist -f with temporary filename.
200200
201-
In [9]: import tempfile
201+
In [9]: import tempfile, os
202202
203-
In [10]: _fd, tfile = tempfile.mkstemp('.py','tmp-ipython-')
203+
In [10]: fd, tfile = tempfile.mkstemp('.py','tmp-ipython-')
204+
In [11]: os.close(fd)
204205
205-
In [11]: %history -nl -y -f $tfile 3
206+
In [12]: %history -nl -y -f $tfile 3
206207
207-
In [13]: import os; os.unlink(tfile)
208+
In [14]: import os; os.unlink(tfile)
208209
"""
209210

210211

0 commit comments

Comments
 (0)