diff options
author | Renato Araujo Oliveira Filho <renato.filho@openbossa.org> | 2011-01-13 15:03:16 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-08 16:51:47 -0300 |
commit | f0181b754558580b90dae8868cb812fa0f6e4322 (patch) | |
tree | 3a09d9c0dee0b24639b073ad66249b61508bbc79 | |
parent | 70d4b7c6adea10c807deee659b875fb31de7f46c (diff) |
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.txt | 1 | ||||
-rw-r--r-- | tests/QtGui/bug_575.py | 20 |
2 files changed, 21 insertions, 0 deletions
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() + |