Esempio n. 1
0
    def test_create_pil_image(self):
        pil_image = ImageDummy(width=300, height=150).create_pil_image()

        assert_pformat_equal(pil_image.width, 300)
        assert_pformat_equal(pil_image.height, 150)

        assert_pformat_equal(pil_image.verify(), None)
Esempio n. 2
0
    def test_create_pil_image(self):
        with warnings.catch_warnings(record=True) as w:
            warnings.simplefilter("always")  # trigger all warnings

            pil_image = ImageDummy(width=300, height=150).create_pil_image()

            assert_pformat_equal(pil_image.width, 300)
            assert_pformat_equal(pil_image.height, 150)

            assert_pformat_equal(pil_image.verify(), None)

            assert_pformat_equal(len(w), 0)  # No warnings created
Esempio n. 3
0
    def test_create_pil_image(self):
        with warnings.catch_warnings(record=True) as w:
            warnings.simplefilter("always")  # trigger all warnings

            pil_image = ImageDummy(width=300, height=150).create_pil_image()

            assert_pformat_equal(pil_image.width, 300)
            assert_pformat_equal(pil_image.height, 150)

            assert_pformat_equal(pil_image.verify(), None)

            assert_pformat_equal(len(w), 0)  # No warnings created