From f0181b754558580b90dae8868cb812fa0f6e4322 Mon Sep 17 00:00:00 2001 From: Renato Araujo Oliveira Filho Date: Thu, 13 Jan 2011 15:03:16 -0300 Subject: Created unit test for bug #575. Reviewer: Hugo Parente Lima Luciano Wolf --- tests/QtGui/CMakeLists.txt | 1 + tests/QtGui/bug_575.py | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 tests/QtGui/bug_575.py (limited to 'tests') diff --git a/tests/QtGui/CMakeLists.txt b/tests/QtGui/CMakeLists.txt index e8d48045d..47d612c49 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 000000000..e5d34d7d4 --- /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() + -- cgit v1.2.3