Skip to content

Commit

Permalink
Add check to see if PIL is importable before running burnin contrib a…
Browse files Browse the repository at this point in the history
…daper tests. (#179)

* Add check to see if PIL is importable before running tests.
* Also check for pil.imaging
  • Loading branch information
ssteinbach committed Nov 13, 2017
1 parent 668a11f commit 744b6ed
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions contrib/adapters/tests/test_burnins.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,18 @@
'ttc\':box=1:boxborderw=5:boxcolor=black@1.0" TEST.MOV')


try:
import PIL # flake8: noqa
from PIL import imaging # flake8: noqa
could_import_pillow = True
except (ImportError):
could_import_pillow = False

@unittest.skipIf(
not could_import_pillow,
"Pillow Required for burnin unit tests. see:"
" https://python-pillow.org/"
)
class FFMPEGBurninsTest(unittest.TestCase):
"""Test Cases for FFMPEG Burnins"""

Expand Down

0 comments on commit 744b6ed

Please sign in to comment.