示例#1
0
 def test_numpy_types(self):
     import cv2
     import numpy as np
     bridge_ = CvBridge()
     self.assertRaises(TypeError, lambda: bridge_.cv2_to_imgmsg(1, "rgba8"))
     self.assertRaises(TypeError,
                       lambda: bridge_.cv2_to_imgmsg(cv2.cv(), "rgba8"))
示例#2
0
文件: enumerants.py 项目: fqez/common
 def test_numpy_types(self):
     import cv2
     import numpy as np
     bridge_ = CvBridge()
     self.assertRaises(TypeError, lambda: bridge_.cv2_to_imgmsg(1, "rgba8"))
     if hasattr(cv2, 'cv'):
         self.assertRaises(TypeError, lambda: bridge_.cv2_to_imgmsg(cv2.cv(), "rgba8"))
示例#3
0
 def test_numpy_types(self):
     bridge_ = CvBridge()
     self.assertRaises(TypeError, lambda: bridge_.cv2_to_imgmsg(1, 'rgba8'))
     if hasattr(cv2, 'cv'):
         self.assertRaises(TypeError, lambda: bridge_.cv2_to_imgmsg(cv2.cv(), 'rgba8'))