mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-26 18:06:18 +03:00
Add docstrings
This commit is contained in:
parent
9dd68bb0be
commit
05b22cedd5
|
@ -7,9 +7,11 @@ TEST_FILE_DXT3 = "Tests/images/dxt3-argb-8bbp-explicitalpha_MipMaps-1.dds"
|
|||
TEST_FILE_DXT5 = "Tests/images/dxt5-argb-8bbp-interpolatedalpha_MipMaps-1.dds"
|
||||
|
||||
|
||||
class TestFileCur(PillowTestCase):
|
||||
class TestFileDds(PillowTestCase):
|
||||
"""Test DdsImagePlugin"""
|
||||
|
||||
def test_sanity_dxt1(self):
|
||||
"""Check DXT1 images can be opened"""
|
||||
im = Image.open(TEST_FILE_DXT1)
|
||||
|
||||
self.assertEqual(im.format, "DDS")
|
||||
|
@ -18,6 +20,7 @@ class TestFileCur(PillowTestCase):
|
|||
self.assertIsInstance(im, DdsImagePlugin.DdsImageFile)
|
||||
|
||||
def test_sanity_dxt5(self):
|
||||
"""Check DXT5 images can be opened"""
|
||||
im = Image.open(TEST_FILE_DXT5)
|
||||
|
||||
self.assertEqual(im.format, "DDS")
|
||||
|
@ -26,10 +29,12 @@ class TestFileCur(PillowTestCase):
|
|||
self.assertIsInstance(im, DdsImagePlugin.DdsImageFile)
|
||||
|
||||
def test_sanity_dxt3(self):
|
||||
"""Check DXT3 images are not supported"""
|
||||
self.assertRaises(NotImplementedError,
|
||||
lambda: Image.open(TEST_FILE_DXT3))
|
||||
|
||||
def test__validate_true(self):
|
||||
"""Check valid prefix"""
|
||||
# Arrange
|
||||
prefix = b"DDS etc"
|
||||
|
||||
|
@ -40,6 +45,7 @@ class TestFileCur(PillowTestCase):
|
|||
self.assertTrue(output)
|
||||
|
||||
def test__validate_false(self):
|
||||
"""Check invalid prefix"""
|
||||
# Arrange
|
||||
prefix = b"something invalid"
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user