##// END OF EJS Templates
Don't try to open temporary file twice in video embed test...
Thomas Kluyver -
Show More
@@ -10,6 +10,7 b' import nose.tools as nt'
10 10
11 11 from IPython.core import display
12 12 from IPython.core.getipython import get_ipython
13 from IPython.utils.tempdir import NamedFileInTemporaryDirectory
13 14 from IPython import paths as ipath
14 15
15 16 import IPython.testing.decorators as dec
@@ -164,9 +165,9 b' def test_video_embedding():'
164 165 with nt.assert_raises(ValueError):
165 166 v = display.Video(b'abc')
166 167
167 with tempfile.NamedTemporaryFile(suffix='.mp4') as f:
168 with open(f.name,'wb') as f:
168 with NamedFileInTemporaryDirectory('test.mp4') as f:
169 169 f.write(b'abc')
170 f.close()
170 171
171 172 v = display.Video(f.name)
172 173 assert not v.embed
General Comments 0
You need to be logged in to leave comments. Login now