From 1ce1649edde21a3501189fde29216117b407e2eb Mon Sep 17 00:00:00 2001 From: Philipp Rudiger Date: Fri, 22 Feb 2019 18:47:07 +0000 Subject: [PATCH] Skip mp4 test if no ffmpeg found --- holoviews/tests/plotting/matplotlib/testrenderer.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/holoviews/tests/plotting/matplotlib/testrenderer.py b/holoviews/tests/plotting/matplotlib/testrenderer.py index a86f5f9c2b..e305cd0b89 100644 --- a/holoviews/tests/plotting/matplotlib/testrenderer.py +++ b/holoviews/tests/plotting/matplotlib/testrenderer.py @@ -4,6 +4,10 @@ """ from __future__ import unicode_literals +import os +import sys +import subprocess + from unittest import SkipTest import numpy as np @@ -69,5 +73,11 @@ def test_render_gif(self): self.assertIn(" 2: + devnull = subprocess.DEVNULL + else: + devnull = open(os.devnull, 'w') + if not subprocess.call(['ffmpeg', '-h'], stdout=devnull, stderr=devnull): + raise SkipTest('ffmpeg not available, skipping mp4 export test') data, metadata = self.renderer.components(self.map1, 'mp4') self.assertIn("