From 6ce11c9e8ca7f1c9a39eb983cdf91994c5f45f6d Mon Sep 17 00:00:00 2001 From: adw1n Date: Fri, 12 May 2017 17:11:58 +0200 Subject: [PATCH] Added tests that call _webp.WebPEncode and _webp.WebPDecode with invalid number of arguments. --- Tests/test_file_webp.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Tests/test_file_webp.py b/Tests/test_file_webp.py index 88f2e5f5b..a15ca97df 100644 --- a/Tests/test_file_webp.py +++ b/Tests/test_file_webp.py @@ -77,6 +77,11 @@ class TestFileWebp(PillowTestCase): self.assertRaises(IOError, lambda: hopper("L").save(temp_file)) + def test_WebPEncode_with_invalid_args(self): + self.assertRaises(TypeError, _webp.WebPEncode) + + def test_WebPDecode_with_invalid_args(self): + self.assertRaises(TypeError, _webp.WebPDecode) if __name__ == '__main__': unittest.main()