Skip to content

Commit

Permalink
optional cv2
Browse files Browse the repository at this point in the history
  • Loading branch information
scivision committed May 15, 2018
1 parent 08c40ff commit ed2f008
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/test_all.py
@@ -1,4 +1,5 @@
#!/usr/bin/env python
import logging
import tempfile
import numpy as np
import subprocess
Expand Down Expand Up @@ -32,6 +33,7 @@ def test_cv2codec_read():
try:
import cv2
except ImportError:
logging.warning('cv2 not installed')
return

fn = R/'tests/star_collapse_out.avi'
Expand All @@ -44,8 +46,10 @@ def test_cv2codec_read():
assert img.shape == (480,720,3),'video not decoded properly'


# cv2.imshow(fn.name, img)
# cv2.destroyAllWindows()
cv2.imshow(fn.name, img)
cv2.waitKey(delay=1000)
cv2.destroyAllWindows()

if __name__ == '__main__':
test_cv2codec_read()
np.testing.run_module_suite()

0 comments on commit ed2f008

Please sign in to comment.