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"))
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"))
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'))