mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-25 09:26:16 +03:00
Removed unnecessary setUp calls
This commit is contained in:
parent
1e56ed8c00
commit
c8e00203ec
|
@ -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'))
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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))
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user