Unittest to bug #324.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
Hugo Parente Lima <hugo.pl@gmail.com>
This commit is contained in:
parent
a44c2b9792
commit
b9bf521a93
1 changed files with 11 additions and 0 deletions
|
|
@ -25,6 +25,17 @@ class QPushButtonTest(UsesQApplication):
|
||||||
timer = QTimer.singleShot(100, self.app.quit)
|
timer = QTimer.singleShot(100, self.app.quit)
|
||||||
self.app.exec_()
|
self.app.exec_()
|
||||||
|
|
||||||
|
def buttonCb(self, checked):
|
||||||
|
self._clicked = True
|
||||||
|
|
||||||
|
def testBoolinSignal(self):
|
||||||
|
b = QPushButton()
|
||||||
|
b.setCheckable(True)
|
||||||
|
self._clicked = False
|
||||||
|
b.toggled[bool].connect(self.buttonCb)
|
||||||
|
b.toggle()
|
||||||
|
self.assert_(self._clicked)
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
unittest.main()
|
unittest.main()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue