[PySide] Unit testing modal dialogs
Diego Gaustein
diego at gaustein.com.ar
Fri Jun 22 21:24:25 CEST 2012
Hello, I'm trying to write unit tests for an application I developed. Using
Python's unittest module and QTest helpers for simulating mouse and
keyboard events works fine for simple widgets, but I'm having trouble
testing the whole application, in particular modal dialogs, since they
block the flow of execution until closed.
Using QTimers for simple dialogs works fine, but the code becomes
increasingly ugly for complex and nested dialogs.
How can I test my application in a straightforward and reliable manner?
Also, when using QMessageBox's static methods I find no way of getting a
reference to the newly created dialog. Is there a way around this?
Many thanks,
Diego
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/pyside/attachments/20120622/b58691fc/attachment.html>
More information about the PySide
mailing list