Merge pull request #3289 from radarhere/qt_setup

Removed unnecessary setUp calls
This commit is contained in:
Hugo 2018-08-29 15:13:19 +03:00 committed by GitHub
commit ca8d93f36c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 8 deletions

View File

@ -1,5 +1,5 @@
from helper import unittest, PillowTestCase, hopper
from test_imageqt import PillowQtTestCase, PillowQPixmapTestCase
from test_imageqt import PillowQPixmapTestCase
from PIL import ImageQt
@ -7,7 +7,6 @@ from PIL import ImageQt
class TestFromQPixmap(PillowQPixmapTestCase, PillowTestCase):
def roundtrip(self, expected):
PillowQtTestCase.setUp(self)
result = ImageQt.fromqpixmap(ImageQt.toqpixmap(expected))
# Qt saves all pixmaps as rgb
self.assert_image_equal(result, expected.convert('RGB'))

View File

@ -25,7 +25,6 @@ if ImageQt.qt_is_installed:
class TestToQImage(PillowQtTestCase, PillowTestCase):
def test_sanity(self):
PillowQtTestCase.setUp(self)
for mode in ('RGB', 'RGBA', 'L', 'P', '1'):
src = hopper(mode)
data = ImageQt.toqimage(src)
@ -61,8 +60,6 @@ class TestToQImage(PillowQtTestCase, PillowTestCase):
self.assert_image_equal(reloaded, src)
def test_segfault(self):
PillowQtTestCase.setUp(self)
app = QApplication([])
ex = Example()
assert(app) # Silence warning

View File

@ -1,5 +1,5 @@
from helper import unittest, PillowTestCase, hopper
from test_imageqt import PillowQtTestCase, PillowQPixmapTestCase
from test_imageqt import PillowQPixmapTestCase
from PIL import ImageQt
@ -10,8 +10,6 @@ if ImageQt.qt_is_installed:
class TestToQPixmap(PillowQPixmapTestCase, PillowTestCase):
def test_sanity(self):
PillowQtTestCase.setUp(self)
for mode in ('1', 'RGB', 'RGBA', 'L', 'P'):
data = ImageQt.toqpixmap(hopper(mode))