aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/QtCore/CMakeLists.txt1
-rw-r--r--tests/QtCore/bug_706.py27
2 files changed, 28 insertions, 0 deletions
diff --git a/tests/QtCore/CMakeLists.txt b/tests/QtCore/CMakeLists.txt
index c6f9ffd43..434c8fe83 100644
--- a/tests/QtCore/CMakeLists.txt
+++ b/tests/QtCore/CMakeLists.txt
@@ -6,6 +6,7 @@ PYSIDE_TEST(bug_462.py)
PYSIDE_TEST(bug_505.py)
PYSIDE_TEST(bug_515.py)
PYSIDE_TEST(bug_656.py)
+PYSIDE_TEST(bug_706.py)
PYSIDE_TEST(blocking_signals_test.py)
PYSIDE_TEST(child_event_test.py)
PYSIDE_TEST(deepcopy_test.py)
diff --git a/tests/QtCore/bug_706.py b/tests/QtCore/bug_706.py
new file mode 100644
index 000000000..18250290d
--- /dev/null
+++ b/tests/QtCore/bug_706.py
@@ -0,0 +1,27 @@
+import unittest
+
+from PySide.QtCore import *
+
+class MyModel (QAbstractListModel):
+ def rowCount(self, parent = None):
+ return 3
+
+class TestBug706(unittest.TestCase):
+
+ def mySlot(self, idx, start, end):
+ self.start = start
+ self.end = end
+
+ def testIt(self):
+ self.start = None
+ self.end = None
+
+ app = QCoreApplication([])
+ model = MyModel()
+ model.columnsAboutToBeInserted.connect(self.mySlot)
+ model.columnsAboutToBeInserted.emit(QModelIndex(), 0, 1)
+ self.assertEqual(self.start, 0)
+ self.assertEqual(self.end, 1)
+
+if __name__ == '__main__':
+ unittest.main()