Fixed unit test to avoid exit with thread running.
Reviewer: Hugo Parente Lima <hugo.pl@gmail.com>
Luciano Wolf <luciano.wolf@openbossa.org>
This commit is contained in:
parent
dd8b0fcfe4
commit
43e499a4fa
1 changed files with 2 additions and 0 deletions
|
|
@ -28,6 +28,7 @@ class MyBaseObject(QObject):
|
||||||
def customEvent(self, event):
|
def customEvent(self, event):
|
||||||
self.events.append(event)
|
self.events.append(event)
|
||||||
if len(self.events) == 3:
|
if len(self.events) == 3:
|
||||||
|
self.t.wait()
|
||||||
self.app.quit()
|
self.app.quit()
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -38,6 +39,7 @@ class CheckForEventsTypes(unittest.TestCase):
|
||||||
o.app.exec_()
|
o.app.exec_()
|
||||||
for e in o.events:
|
for e in o.events:
|
||||||
self.assert_(isinstance(e, MyEvent))
|
self.assert_(isinstance(e, MyEvent))
|
||||||
|
o.app = None
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
unittest.main()
|
unittest.main()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue