mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-10 19:56:47 +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 helper import unittest, PillowTestCase, hopper
|
||||||
from test_imageqt import PillowQtTestCase, PillowQPixmapTestCase
|
from test_imageqt import PillowQPixmapTestCase
|
||||||
|
|
||||||
from PIL import ImageQt
|
from PIL import ImageQt
|
||||||
|
|
||||||
|
@ -7,7 +7,6 @@ from PIL import ImageQt
|
||||||
class TestFromQPixmap(PillowQPixmapTestCase, PillowTestCase):
|
class TestFromQPixmap(PillowQPixmapTestCase, PillowTestCase):
|
||||||
|
|
||||||
def roundtrip(self, expected):
|
def roundtrip(self, expected):
|
||||||
PillowQtTestCase.setUp(self)
|
|
||||||
result = ImageQt.fromqpixmap(ImageQt.toqpixmap(expected))
|
result = ImageQt.fromqpixmap(ImageQt.toqpixmap(expected))
|
||||||
# Qt saves all pixmaps as rgb
|
# Qt saves all pixmaps as rgb
|
||||||
self.assert_image_equal(result, expected.convert('RGB'))
|
self.assert_image_equal(result, expected.convert('RGB'))
|
||||||
|
|
|
@ -25,7 +25,6 @@ if ImageQt.qt_is_installed:
|
||||||
class TestToQImage(PillowQtTestCase, PillowTestCase):
|
class TestToQImage(PillowQtTestCase, PillowTestCase):
|
||||||
|
|
||||||
def test_sanity(self):
|
def test_sanity(self):
|
||||||
PillowQtTestCase.setUp(self)
|
|
||||||
for mode in ('RGB', 'RGBA', 'L', 'P', '1'):
|
for mode in ('RGB', 'RGBA', 'L', 'P', '1'):
|
||||||
src = hopper(mode)
|
src = hopper(mode)
|
||||||
data = ImageQt.toqimage(src)
|
data = ImageQt.toqimage(src)
|
||||||
|
@ -61,8 +60,6 @@ class TestToQImage(PillowQtTestCase, PillowTestCase):
|
||||||
self.assert_image_equal(reloaded, src)
|
self.assert_image_equal(reloaded, src)
|
||||||
|
|
||||||
def test_segfault(self):
|
def test_segfault(self):
|
||||||
PillowQtTestCase.setUp(self)
|
|
||||||
|
|
||||||
app = QApplication([])
|
app = QApplication([])
|
||||||
ex = Example()
|
ex = Example()
|
||||||
assert(app) # Silence warning
|
assert(app) # Silence warning
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
from helper import unittest, PillowTestCase, hopper
|
from helper import unittest, PillowTestCase, hopper
|
||||||
from test_imageqt import PillowQtTestCase, PillowQPixmapTestCase
|
from test_imageqt import PillowQPixmapTestCase
|
||||||
|
|
||||||
from PIL import ImageQt
|
from PIL import ImageQt
|
||||||
|
|
||||||
|
@ -10,8 +10,6 @@ if ImageQt.qt_is_installed:
|
||||||
class TestToQPixmap(PillowQPixmapTestCase, PillowTestCase):
|
class TestToQPixmap(PillowQPixmapTestCase, PillowTestCase):
|
||||||
|
|
||||||
def test_sanity(self):
|
def test_sanity(self):
|
||||||
PillowQtTestCase.setUp(self)
|
|
||||||
|
|
||||||
for mode in ('1', 'RGB', 'RGBA', 'L', 'P'):
|
for mode in ('1', 'RGB', 'RGBA', 'L', 'P'):
|
||||||
data = ImageQt.toqpixmap(hopper(mode))
|
data = ImageQt.toqpixmap(hopper(mode))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user