aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Filho <renato.filho@openbossa.org>2011-04-13 15:10:50 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-08 16:54:09 -0300
commit2a788ba61801c858a739b0e7947dc5a6589e686d (patch)
treef4a44061c3114739b5c4ba0d9d3098a9fd18a9b3
parentfa3bbed001275d7a3aef8120cb4ee58abfe603ca (diff)
Created unit test for bug #722.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org> Lauro Moura <lauro.neto@openbossa.org>
-rw-r--r--tests/QtGui/CMakeLists.txt1
-rw-r--r--tests/QtGui/bug_722.py24
2 files changed, 25 insertions, 0 deletions
diff --git a/tests/QtGui/CMakeLists.txt b/tests/QtGui/CMakeLists.txt
index 086568821..ee19a59ee 100644
--- a/tests/QtGui/CMakeLists.txt
+++ b/tests/QtGui/CMakeLists.txt
@@ -45,6 +45,7 @@ PYSIDE_TEST(bug_688.py)
PYSIDE_TEST(bug_696.py)
PYSIDE_TEST(bug_693.py)
PYSIDE_TEST(bug_714.py)
+PYSIDE_TEST(bug_722.py)
PYSIDE_TEST(bug_728.py)
PYSIDE_TEST(bug_736.py)
PYSIDE_TEST(bug_793.py)
diff --git a/tests/QtGui/bug_722.py b/tests/QtGui/bug_722.py
new file mode 100644
index 000000000..76f7ee03f
--- /dev/null
+++ b/tests/QtGui/bug_722.py
@@ -0,0 +1,24 @@
+import unittest
+
+from helper import UsesQApplication
+
+from PySide.QtGui import QDoubleSpinBox, QGraphicsBlurEffect
+
+class TestSignalConnection(UsesQApplication):
+ def testFloatSignal(self):
+ foo1 = QDoubleSpinBox()
+ foo2 = QDoubleSpinBox()
+ foo1.valueChanged[float].connect(foo2.setValue)
+ foo2.valueChanged[float].connect(foo1.setValue)
+ foo1.setValue(0.42)
+ self.assertEqual(foo1.value(), foo2.value())
+
+ def testQRealSignal(self):
+ foo1 = QDoubleSpinBox()
+ effect = QGraphicsBlurEffect()
+ effect.blurRadiusChanged['qreal'].connect(foo1.setValue) # check if qreal is a valid type
+ effect.setBlurRadius(0.42)
+ self.assertEqual(foo1.value(), effect.blurRadius())
+
+if __name__ == '__main__':
+ unittest.main()