Exemplo n.º 1
0
    def test_qt(self):
        """Test :py:class:`Size` type.
        """
        module = importlib.import_module('qtgui.widgets.image')
        self.assertIn('qimage', Image.supported_formats())

        image = Image(self.example_image_filename)
        qimage = Image.as_qimage(image)
        self.assertIsInstance(qimage, module.QImage)
Exemplo n.º 2
0
    def test_pillow(self):
        """Test :py:class:`Size` type.
        """
        module = importlib.import_module('dltb.thirdparty.pil')
        self.assertIn('pil', Image.supported_formats())

        image = Image(self.example_image_filename)
        pil = Image.as_pil(image)
        self.assertIsInstance(pil, module.PIL.Image.Image)
Exemplo n.º 3
0
 def test_supported_formats(self):
     """Test supported image formats.
     """
     self.assertIn('array', Image.supported_formats())
     self.assertIn('image', Image.supported_formats())