Created unit test for bug #617.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
Marcelo Lira <marcelo.lira@openbossa.org>
This commit is contained in:
parent
6c3258cc03
commit
f3bcaf31a8
2 changed files with 22 additions and 0 deletions
|
|
@ -30,6 +30,7 @@ PYSIDE_TEST(bug_575.py)
|
||||||
PYSIDE_TEST(bug_576.py)
|
PYSIDE_TEST(bug_576.py)
|
||||||
PYSIDE_TEST(bug_585.py)
|
PYSIDE_TEST(bug_585.py)
|
||||||
PYSIDE_TEST(bug_589.py)
|
PYSIDE_TEST(bug_589.py)
|
||||||
|
PYSIDE_TEST(bug_617.py)
|
||||||
PYSIDE_TEST(bug_640.py)
|
PYSIDE_TEST(bug_640.py)
|
||||||
PYSIDE_TEST(customproxywidget_test.py)
|
PYSIDE_TEST(customproxywidget_test.py)
|
||||||
PYSIDE_TEST(deepcopy_test.py)
|
PYSIDE_TEST(deepcopy_test.py)
|
||||||
|
|
|
||||||
21
tests/QtGui/bug_617.py
Normal file
21
tests/QtGui/bug_617.py
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
from PySide.QtCore import QEvent
|
||||||
|
from PySide.QtGui import QColor
|
||||||
|
import unittest
|
||||||
|
|
||||||
|
class MyEvent(QEvent):
|
||||||
|
def __init__(self):
|
||||||
|
QEvent.__init__(self, QEvent.Type(999))
|
||||||
|
|
||||||
|
|
||||||
|
class Bug617(unittest.TestCase):
|
||||||
|
def testRepr(self):
|
||||||
|
c = QColor.fromRgb(1, 2, 3, 4)
|
||||||
|
s = c.spec()
|
||||||
|
self.assertEqual(repr(s), repr(QColor.Rgb))
|
||||||
|
|
||||||
|
def testOutOfBounds(self):
|
||||||
|
e = MyEvent()
|
||||||
|
self.assertEqual(repr(e.type()), '<enum-item Type.#out of bounds# (999)>')
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
unittest.main()
|
||||||
Loading…
Add table
Add a link
Reference in a new issue