Moved list_signal_test to pysidetest library.
This isolate the test case, and avoid other problems with X during the
buildbot compilation.
Reviewer: Lauro Moura <lauro.neto@openbossa.org>
Hugo Parente Lima <hugo.pl@gmail.com>
This commit is contained in:
parent
d3b630e168
commit
2734efb6b7
5 changed files with 27 additions and 36 deletions
|
|
@ -6,7 +6,6 @@ PYSIDE_TEST(decorators_test.py)
|
|||
PYSIDE_TEST(invalid_callback_test.py)
|
||||
PYSIDE_TEST(lambda_gui_test.py)
|
||||
PYSIDE_TEST(lambda_test.py)
|
||||
PYSIDE_TEST(list_signal_test.py)
|
||||
PYSIDE_TEST(leaking_signal_test.py)
|
||||
PYSIDE_TEST(multiple_connections_gui_test.py)
|
||||
PYSIDE_TEST(multiple_connections_test.py)
|
||||
|
|
|
|||
|
|
@ -1,35 +0,0 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
import unittest
|
||||
|
||||
from PySide.QtCore import *
|
||||
from PySide.QtGui import *
|
||||
|
||||
class ListConnectionTest(unittest.TestCase):
|
||||
|
||||
def modifyScene(self):
|
||||
self.scene.addLine(0, 0, 10, 10)
|
||||
|
||||
def sceneChanged(self, rects):
|
||||
# Qt isn't so cute and sends this signal with empty lists and null rects sometimes.
|
||||
if len(rects) > 0 and not rects[0].isNull():
|
||||
self.rects = rects
|
||||
QApplication.quit()
|
||||
|
||||
def testConnection(self):
|
||||
app = QApplication([])
|
||||
|
||||
self.scene = QGraphicsScene()
|
||||
QTimer.singleShot(0, self.modifyScene)
|
||||
self.scene.changed.connect(self.sceneChanged)
|
||||
|
||||
app.exec_()
|
||||
self.assertEquals(len(self.rects), 1)
|
||||
self.assertEquals(self.rects[0].x(), 0)
|
||||
self.assertEquals(self.rects[0].y(), 0)
|
||||
self.assertEquals(self.rects[0].width(), 10)
|
||||
self.assertEquals(self.rects[0].height(), 10)
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue