Removed deprecation test (#36)

Removed deprecation test
This commit is contained in:
Hugo van Kemenade 2019-10-02 16:26:34 +03:00 committed by GitHub
commit 40f29ab60e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,13 +1,7 @@
import sys
import warnings
from PIL import ImageQt
from .helper import PillowTestCase, hopper
if sys.version_info.major >= 3:
from importlib import reload
if ImageQt.qt_is_installed:
from PIL.ImageQt import qRgba
@ -75,13 +69,3 @@ class TestImageQt(PillowQtTestCase, PillowTestCase):
def test_image(self):
for mode in ("1", "RGB", "RGBA", "L", "P"):
ImageQt.ImageQt(hopper(mode))
def test_deprecated(self):
with warnings.catch_warnings(record=True) as w:
reload(ImageQt)
if ImageQt.qt_version in ["4", "side"]:
self.assertEqual(len(w), 1)
self.assertTrue(issubclass(w[-1].category, DeprecationWarning))
else:
# No warning.
self.assertEqual(w, [])