Added test for bug #395 - error calling QPainter.drawLines overloads.
Reviewed by Luciano Wolf <luciano.wolf@openbossa.org> Reviewed by Renato Araújo <renato.filho@openbossa.org>
This commit is contained in:
parent
4a638ed634
commit
e733c2b11b
1 changed files with 14 additions and 6 deletions
|
|
@ -1,7 +1,7 @@
|
|||
import unittest
|
||||
|
||||
from PySide.QtGui import QPainter, QBrush, QLinearGradient
|
||||
from PySide.QtCore import QRect, QRectF, Qt
|
||||
from PySide.QtGui import QPainter, QLinearGradient
|
||||
from PySide.QtCore import QLine, QLineF, QPoint, QPointF, QRect, QRectF, Qt
|
||||
|
||||
class QPainterDrawText(unittest.TestCase):
|
||||
|
||||
|
|
@ -36,6 +36,14 @@ class QPainterDrawText(unittest.TestCase):
|
|||
|
||||
self.assert_(isinstance(newRect, QRectF))
|
||||
|
||||
def testDrawLinesOverloads(self):
|
||||
'''Calls QPainter.drawLines overloads, if something is
|
||||
wrong Exception and chaos ensues. Bug #395'''
|
||||
self.painter.drawLines([QLine(QPoint(0,0), QPoint(1,1))])
|
||||
self.painter.drawLines([QPoint(0,0), QPoint(1,1)])
|
||||
self.painter.drawLines([QPointF(0,0), QPointF(1,1)])
|
||||
self.painter.drawLines([QLineF(QPointF(0,0), QPointF(1,1))])
|
||||
|
||||
class SetBrushWithOtherArgs(unittest.TestCase):
|
||||
'''Using qpainter.setBrush with args other than QBrush'''
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue