diff options
author | Paulo Alcantara <paulo.alcantara@openbossa.org> | 2011-05-10 16:31:42 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-08 16:54:22 -0300 |
commit | ad023b3cb5b2bcb1598983bccba0a49c56b9d58e (patch) | |
tree | fb21efa1ed72ab136ae95236736c2186b589f0d3 /tests/QtCore | |
parent | 6545eb21f52545f2319d853a827a1122dfbac6cf (diff) |
Create unit tests for bug #606
Signed-off-by: Paulo Alcantara <paulo.alcantara@openbossa.org>
Reviewer: Lauro Moura <lauro.neto@openbossa.org>
Marcelo Lira <marcelo.lira@openbossa.org>
Diffstat (limited to 'tests/QtCore')
-rw-r--r-- | tests/QtCore/CMakeLists.txt | 1 | ||||
-rw-r--r-- | tests/QtCore/bug_606.py | 34 |
2 files changed, 35 insertions, 0 deletions
diff --git a/tests/QtCore/CMakeLists.txt b/tests/QtCore/CMakeLists.txt index cea782c3d..623326321 100644 --- a/tests/QtCore/CMakeLists.txt +++ b/tests/QtCore/CMakeLists.txt @@ -5,6 +5,7 @@ PYSIDE_TEST(bug_428.py) PYSIDE_TEST(bug_462.py) PYSIDE_TEST(bug_505.py) PYSIDE_TEST(bug_515.py) +PYSIDE_TEST(bug_606.py) PYSIDE_TEST(bug_656.py) PYSIDE_TEST(bug_699.py) PYSIDE_TEST(bug_706.py) diff --git a/tests/QtCore/bug_606.py b/tests/QtCore/bug_606.py new file mode 100644 index 000000000..219b8d99b --- /dev/null +++ b/tests/QtCore/bug_606.py @@ -0,0 +1,34 @@ +import unittest + +import PySide +from PySide.QtCore import QPoint, QPointF +from PySide.QtCore import QLine, QLineF +from PySide.QtCore import QSize, QSizeF + +class testCases(unittest.TestCase): + def testQPointToTuple(self): + p = QPoint(1, 2) + self.assertEqual((1, 2), p.toTuple()) + + def testQPointFToTuple(self): + p = QPointF(1, 2) + self.assertEqual((1, 2), p.toTuple()) + + def testQLineToTuple(self): + l = QLine(1, 2, 3, 4) + self.assertEqual((1, 2, 3, 4), l.toTuple()) + + def testQLineFToTuple(self): + l = QLineF(1, 2, 3, 4) + self.assertEqual((1, 2, 3, 4), l.toTuple()) + + def testQSizeToTuple(self): + s = QSize(1, 2) + self.assertEqual((1, 2), s.toTuple()) + + def testQSizeFToTuple(self): + s = QSizeF(1, 2) + self.assertEqual((1, 2), s.toTuple()) + +if __name__ == '__main__': + unittest.main() |