def test_savemoviefiles():
# This function is deprecated
if os.name != 'nt':
# If not on Windows, this should break
with pytest.raises(OSError):
files.savemoviefiles('invalid.avi', np.zeros(10), path='./')
else:
# Trigger an import error
with mock.patch.dict("sys.modules", {"PIL": {}}):
with pytest.raises(ImportError):
files.savemoviefiles('invalid.avi', np.zeros(10), path='./')
# smoke test
with pytest.warns(UserWarning):
files.savemoviefiles('invalid.avi', np.zeros(10), path='./')
评论列表
文章目录