def test_opencv(self):
        import cv2

        cv_image = cv2.imread('vlogging/tests/lenna.jpg')
        s = str(vlogging.VisualRecord(
            title="title",
            imgs=cv_image,
            footnotes="footnotes"))

        self.assertTrue("title" in s)
        self.assertTrue("footnotes" in s)
        self.assertTrue("<pre>" in s)
        self.assertEqual(s.count("<img"), 1)

        s = str(vlogging.VisualRecord(
            title="title",
            imgs=[cv_image],
            footnotes="footnotes"))

        self.assertEqual(s.count("<img"), 1)

        s = str(vlogging.VisualRecord(
            title="title",
            imgs=[cv_image, cv_image],
            footnotes="footnotes"))

        self.assertEqual(s.count("<img"), 2)
dataset/ETHPy150Open dchaplinsky/visual-logging/vlogging/tests/basic.py/BasicTestCase.test_opencv/original