mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-26 01:46:18 +03:00
Test unsupported features
This commit is contained in:
parent
aed878e7d1
commit
05987c8d60
|
@ -7,7 +7,8 @@ class TestFeatures(PillowTestCase):
|
||||||
|
|
||||||
def test_check_features(self):
|
def test_check_features(self):
|
||||||
for feature in features.modules:
|
for feature in features.modules:
|
||||||
self.assertTrue(features.check_module(feature) in [True, False, None])
|
self.assertTrue(
|
||||||
|
features.check_module(feature) in [True, False, None])
|
||||||
for feature in features.codecs:
|
for feature in features.codecs:
|
||||||
self.assertTrue(features.check_codec(feature) in [True, False])
|
self.assertTrue(features.check_codec(feature) in [True, False])
|
||||||
|
|
||||||
|
@ -15,6 +16,19 @@ class TestFeatures(PillowTestCase):
|
||||||
self.assertTrue(type(features.get_supported_modules()) is list)
|
self.assertTrue(type(features.get_supported_modules()) is list)
|
||||||
self.assertTrue(type(features.get_supported_codecs()) is list)
|
self.assertTrue(type(features.get_supported_codecs()) is list)
|
||||||
|
|
||||||
|
def test_unsupported_codec(self):
|
||||||
|
# Arrange
|
||||||
|
codec = "unsupported_codec"
|
||||||
|
# Act / Assert
|
||||||
|
self.assertRaises(ValueError, lambda: features.check_codec(codec))
|
||||||
|
|
||||||
|
def test_unsupported_module(self):
|
||||||
|
# Arrange
|
||||||
|
module = "unsupported_module"
|
||||||
|
# Act / Assert
|
||||||
|
self.assertRaises(ValueError, lambda: features.check_module(module))
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
unittest.main()
|
unittest.main()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user