Skip to content

Commit

Permalink
Merge b6e143b into d4d5df1
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk committed Feb 19, 2017
2 parents d4d5df1 + b6e143b commit b8363b6
Showing 1 changed file with 4 additions and 15 deletions.
19 changes: 4 additions & 15 deletions Tests/test_image_toqimage.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@


if ImageQt.qt_is_installed:
from PIL.ImageQt import QImage, QPixmap
from PIL.ImageQt import QImage

try:
from PyQt5 import QtGui
Expand All @@ -14,8 +14,6 @@
from PyQt4 import QtGui
except (ImportError, RuntimeError):
from PySide import QtGui




class TestToQImage(PillowQtTestCase, PillowTestCase):
Expand All @@ -32,12 +30,13 @@ def test_sanity(self):
tempfile = self.tempfile('temp_{}.png'.format(mode))
data.save(tempfile)


def test_segfault(self):
PillowQtTestCase.setUp(self)

app = QtGui.QApplication([])
ex = Example()
assert(app) # Silence warning
assert(ex) # Silence warning


if ImageQt.qt_is_installed:
Expand All @@ -46,7 +45,7 @@ class Example(QtGui.QWidget):
def __init__(self):
super(Example, self).__init__()

img = hopper().resize((1000,1000))
img = hopper().resize((1000, 1000))

qimage = ImageQt.ImageQt(img)

Expand All @@ -59,15 +58,5 @@ def __init__(self):
lbl.setPixmap(pixmap1.copy())




def main():
app = QtGui.QApplication(sys.argv)
ex = Example()
sys.exit(app.exec_())




if __name__ == '__main__':
unittest.main()

0 comments on commit b8363b6

Please sign in to comment.