aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2010-09-01 15:06:17 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2010-09-01 16:55:00 -0300
commit5c0d39b9dc18450364399f68ba0db3b19a9605c8 (patch)
tree92c408b78e39db7cdd119c906c2281e7aa939d3b /tests
parente0a5ca517f60b24fed19ac406300be8d103730b4 (diff)
Fix bug#316 - "QAbstractItemModel.createIndex is broken"
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org> Renato Araújo <renato.filho@openbossa.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/QtCore/CMakeLists.txt1
-rw-r--r--tests/QtCore/qabstractitemmodel_test.py21
2 files changed, 22 insertions, 0 deletions
diff --git a/tests/QtCore/CMakeLists.txt b/tests/QtCore/CMakeLists.txt
index cf7727f45..4e7e8ec6b 100644
--- a/tests/QtCore/CMakeLists.txt
+++ b/tests/QtCore/CMakeLists.txt
@@ -7,6 +7,7 @@ PYSIDE_TEST(duck_punching_test.py)
PYSIDE_TEST(hash_test.py)
PYSIDE_TEST(missing_symbols_test.py)
PYSIDE_TEST(qabs_test.py)
+PYSIDE_TEST(qabstractitemmodel_test.py)
PYSIDE_TEST(qabstracttransition_test.py)
PYSIDE_TEST(qanimationgroup_test.py)
PYSIDE_TEST(qbitarray_test.py)
diff --git a/tests/QtCore/qabstractitemmodel_test.py b/tests/QtCore/qabstractitemmodel_test.py
new file mode 100644
index 000000000..93306ca5f
--- /dev/null
+++ b/tests/QtCore/qabstractitemmodel_test.py
@@ -0,0 +1,21 @@
+# -*- coding: utf-8 -*-
+
+import unittest
+from PySide.QtCore import *
+
+class MyModel (QAbstractListModel):
+ pass
+
+class Foo:
+ pass
+
+class TestQModelIndexInternalPointer(unittest.TestCase):
+
+ def testInternalPointer(self):
+ m = MyModel()
+ foo = Foo()
+ idx = m.createIndex(0,0, foo)
+
+if __name__ == '__main__':
+ unittest.main()
+