summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Araujo Oliveira Filho <renato.filho@openbossa.org>2011-01-13 15:03:16 -0300
committerRenato Araujo Oliveira Filho <renato.filho@openbossa.org>2011-01-17 10:46:43 -0300
commit50e6f7671db7a561a4832e7ddf6cf1eec326fb93 (patch)
tree0bc770ed14df06fd02d5950a33db3e8b0fed4a03
parent499051fd2a257ec2173e70889d6d8b72f65b968f (diff)
downloadpyside-50e6f7671db7a561a4832e7ddf6cf1eec326fb93.tar.gz
pyside-50e6f7671db7a561a4832e7ddf6cf1eec326fb93.tar.xz
pyside-50e6f7671db7a561a4832e7ddf6cf1eec326fb93.zip
Created unit test for bug #575.
Reviewer: Hugo Parente Lima <hugo.pl@gmail.com> Luciano Wolf <luciano.wolf@openbossa.org>
-rw-r--r--tests/QtGui/CMakeLists.txt1
-rw-r--r--tests/QtGui/bug_575.py20
2 files changed, 21 insertions, 0 deletions
diff --git a/tests/QtGui/CMakeLists.txt b/tests/QtGui/CMakeLists.txt
index e8d4804..47d612c 100644
--- a/tests/QtGui/CMakeLists.txt
+++ b/tests/QtGui/CMakeLists.txt
@@ -26,6 +26,7 @@ PYSIDE_TEST(bug_546.py)
PYSIDE_TEST(bug_547.py)
PYSIDE_TEST(bug_549.py)
PYSIDE_TEST(bug_569.py)
+PYSIDE_TEST(bug_575.py)
PYSIDE_TEST(bug_576.py)
PYSIDE_TEST(bug_585.py)
PYSIDE_TEST(bug_589.py)
diff --git a/tests/QtGui/bug_575.py b/tests/QtGui/bug_575.py
new file mode 100644
index 0000000..e5d34d7
--- /dev/null
+++ b/tests/QtGui/bug_575.py
@@ -0,0 +1,20 @@
+""" Unittest for bug #575 """
+""" http://bugs.openbossa.org/show_bug.cgi?id=575 """
+
+from PySide.QtGui import QApplication, QPlainTextEdit, QTextEdit
+import sys
+import unittest
+
+class Bug575(unittest.TestCase):
+ def testPropertyValues(self):
+ app = QApplication(sys.argv)
+ textEdit = QPlainTextEdit()
+ textEdit.insertPlainText("PySide INdT")
+ selection = QTextEdit.ExtraSelection()
+ selection.cursor = textEdit.textCursor()
+ selection.cursor.setPosition(2)
+ self.assertEqual(selection.cursor.position(), 2)
+
+if __name__ == '__main__':
+ unittest.main()
+