Пример #1
0
    def test__cvt_res_sequence(self):
        # Arrange
        from PIL.TiffImagePlugin import _cvt_res
        value = [0, 1]

        # Act
        ret = _cvt_res(value)

        # Assert
        self.assertEqual(ret, [0, 1])
Пример #2
0
    def test__cvt_res_float(self):
        # Arrange
        from PIL.TiffImagePlugin import _cvt_res
        value = 22.3

        # Act
        ret = _cvt_res(value)

        # Assert
        self.assertEqual(ret, (1461452, 65536))
Пример #3
0
    def test__cvt_res_int(self):
        # Arrange
        from PIL.TiffImagePlugin import _cvt_res
        value = 34

        # Act
        ret = _cvt_res(value)

        # Assert
        self.assertEqual(ret, (34, 1))
Пример #4
0
    def test__cvt_res_sequence(self):
        # Arrange
        from PIL.TiffImagePlugin import _cvt_res
        value = [0, 1]

        # Act
        ret = _cvt_res(value)

        # Assert
        self.assertEqual(ret, [0, 1])
Пример #5
0
    def test__cvt_res_float(self):
        # Arrange
        from PIL.TiffImagePlugin import _cvt_res
        value = 22.3

        # Act
        ret = _cvt_res(value)

        # Assert
        self.assertEqual(ret, (1461452, 65536))
Пример #6
0
    def test__cvt_res_int(self):
        # Arrange
        from PIL.TiffImagePlugin import _cvt_res
        value = 34

        # Act
        ret = _cvt_res(value)

        # Assert
        self.assertEqual(ret, (34, 1))