Created new unittest model.
Separete unittest for module.
Only run unittest for compiled modules.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>,
Luciano Wolf <luciano.wolf@openbossa.org>
This commit is contained in:
parent
471486732b
commit
ab918abc1e
211 changed files with 241 additions and 79 deletions
|
|
@ -1,29 +0,0 @@
|
|||
#!/usr/bin/python
|
||||
|
||||
import unittest
|
||||
|
||||
from PySide import QtCore
|
||||
from PySide import QtGui
|
||||
from helper import UsesQApplication
|
||||
|
||||
class Item(QtGui.QGraphicsItem):
|
||||
|
||||
def __init__(self):
|
||||
QtGui.QGraphicsItem.__init__(self)
|
||||
|
||||
def boundingRect(self):
|
||||
return QtCore.QRectF(0, 0, 100, 100)
|
||||
|
||||
def paint(self, painter, option, widget):
|
||||
painter.setBrush(QtGui.QColor(255, 255, 255))
|
||||
painter.drawRect(0, 0, 100, 100)
|
||||
|
||||
|
||||
class QGraphicsViewIsBlockedTest(UsesQApplication):
|
||||
|
||||
def testIsBlockedByModalPanel(self):
|
||||
(first, second) = Item().isBlockedByModalPanel()
|
||||
self.assertFalse(first)
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
Loading…
Add table
Add a link
Reference in a new issue