[PyQt] QTestLib

Andreas Pakulat apaku at gmx.de
Sat Jan 16 21:28:48 GMT 2010

On 17.01.10 00:08:39, Ruslan Popov wrote:
> Can someone share an example of using QTestLib with GUI application?
> I've read manuals and some Qt4 books, but they talk about C++ way, not
> Python.

I don't think QTestlib works so easily in python as it uses a special
macro in C++ to generate the boilerplate code to start the unit-test.

You could probably lookup what the QTEST_MAIN macro does in Qt's c++
code and create similar code in python, but it might just as well be
easier to use an existing python unit-testing framework to drive your
tests. And the function to trigger signals or send events don't need the
QTestlib setup to be used.


A visit to a fresh place will bring strange work.

More information about the PyQt mailing list