mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-26 01:46:18 +03:00
commit
94925c5057
|
@ -23,20 +23,20 @@ class TestFeatures(PillowTestCase):
|
|||
self.assertEqual(features.check_feature(feature),
|
||||
features.check(feature))
|
||||
|
||||
@unittest.skipUnless(HAVE_WEBP, True)
|
||||
def check_webp_transparency(self):
|
||||
@unittest.skipUnless(HAVE_WEBP, "WebP not available")
|
||||
def test_webp_transparency(self):
|
||||
self.assertEqual(features.check('transp_webp'),
|
||||
not _webp.WebPDecoderBuggyAlpha())
|
||||
self.assertEqual(features.check('transp_webp'),
|
||||
_webp.HAVE_TRANSPARENCY)
|
||||
|
||||
@unittest.skipUnless(HAVE_WEBP, True)
|
||||
def check_webp_mux(self):
|
||||
@unittest.skipUnless(HAVE_WEBP, "WebP not available")
|
||||
def test_webp_mux(self):
|
||||
self.assertEqual(features.check('webp_mux'),
|
||||
_webp.HAVE_WEBPMUX)
|
||||
|
||||
@unittest.skipUnless(HAVE_WEBP, True)
|
||||
def check_webp_anim(self):
|
||||
@unittest.skipUnless(HAVE_WEBP, "WebP not available")
|
||||
def test_webp_anim(self):
|
||||
self.assertEqual(features.check('webp_anim'),
|
||||
_webp.HAVE_WEBPANIM)
|
||||
|
||||
|
|
|
@ -13,15 +13,11 @@ class TestFormatHSV(PillowTestCase):
|
|||
return float(i)/255.0
|
||||
|
||||
def str_to_float(self, i):
|
||||
|
||||
return float(ord(i))/255.0
|
||||
|
||||
def to_int(self, f):
|
||||
return int(f*255.0)
|
||||
|
||||
def tuple_to_ints(self, tp):
|
||||
x, y, z = tp
|
||||
return (int(x*255.0), int(y*255.0), int(z*255.0))
|
||||
return int(x*255.0), int(y*255.0), int(z*255.0)
|
||||
|
||||
def test_sanity(self):
|
||||
Image.new('HSV', (100, 100))
|
||||
|
|
|
@ -5,19 +5,12 @@ from PIL import __version__
|
|||
try:
|
||||
import pyroma
|
||||
except ImportError:
|
||||
# Skip via setUp()
|
||||
pass
|
||||
pyroma = None
|
||||
|
||||
|
||||
class TestPyroma(PillowTestCase):
|
||||
|
||||
def setUp(self):
|
||||
try:
|
||||
import pyroma
|
||||
assert pyroma # Ignore warning
|
||||
except ImportError:
|
||||
self.skipTest("ImportError")
|
||||
|
||||
@unittest.skipUnless(pyroma, "Pyroma is not installed")
|
||||
def test_pyroma(self):
|
||||
# Arrange
|
||||
data = pyroma.projectdata.get_data(".")
|
||||
|
|
Loading…
Reference in New Issue
Block a user