diff --git a/IPython/core/tests/test_display.py b/IPython/core/tests/test_display.py index fca6963..5d827e3 100644 --- a/IPython/core/tests/test_display.py +++ b/IPython/core/tests/test_display.py @@ -2,6 +2,7 @@ # Distributed under the terms of the Modified BSD License. import json +import tempfile import os import warnings @@ -149,4 +150,12 @@ def test_json(): nt.assert_equal(len(w), 1) nt.assert_equal(j._repr_json_(), lis) - +def test_video_embedding(): + """use a tempfile, with dummy-data, to ensure that video embedding doesn't crash""" + with tempfile.NamedTemporaryFile(suffix='.mp4') as f: + with open(f.name,'wb') as f: + f.write(b'abc') + + v = display.Video(f.name, embed=True) + html = v._repr_html_() + nt.assert_in('src="data:video/mp4;base64,YWJj"',html)