Added feature checking tests

This commit is contained in:
Andrew Murray 2015-05-15 07:33:17 +10:00
parent 98fa49ea37
commit 3458e7a4c3

21
Tests/test_features.py Normal file
View File

@ -0,0 +1,21 @@
from helper import unittest, PillowTestCase
from PIL import features
class TestFeatures(PillowTestCase):
def test_check_features(self):
for feature in features.modules:
self.assertTrue(features.check_module(feature) in [True, False, None])
for feature in features.codecs:
self.assertTrue(features.check_codec(feature) in [True, False])
def test_supported_features(self):
self.assertTrue(type(features.get_supported_modules()) is list)
self.assertTrue(type(features.get_supported_codecs()) is list)
if __name__ == '__main__':
unittest.main()
# End of file