[PyQt] unit testing pyqt app components

Florian Bruhin me at the-compiler.org
Mon Sep 7 20:04:54 BST 2015


* oliver <oliver.schoenborn at gmail.com> [2015-09-07 14:10:33 -0400]:
> On Thu, Sep 3, 2015 at 10:38 AM, Florian Bruhin <me at the-compiler.org> wrote:
> 
> > * oliver <oliver.schoenborn at gmail.com> [2015-09-03 09:41:52 -0400]:
> > > Thanks I'll check it out, if anything I can use some of the techniques.
> > But
> > > if I were to switch some tests over to pytest+qt plugin, basically the
> > > first test would create the QApplication, and once the exec is entered in
> > > first test, it never returns until the whole test suite is done? How does
> > > the test driver ever regain control to start the next test (which will
> > > presumably just create a widget and not call exec())?
> >
> > The QApplication is created by the plugin ahead of the first test -
> > and exec() is never called on it, only QApplication::processEvents
> > (which processes all queued events and then returns).
> >
> 
> So sendPostedEvents() is not needed (except after quitting the loop,
> judging by qcoreapplication::exec() source)?

Let me put it this way: We didn't manage to write a test which would
need it so far ;)

> Is > https://github.com/qtproject/qtbase the best online place to
> look at Qt source?

http://code.qt.io/cgit/qt/qtbase.git/tree/ would be the official
place.

http://code.woboq.org/qt5/qtbase/ is quite cool too because of its
nice code browsing features.

Florian

-- 
http://www.the-compiler.org | me at the-compiler.org (Mail/XMPP)
   GPG: 916E B0C8 FD55 A072 | http://the-compiler.org/pubkey.asc
         I love long mails! | http://email.is-not-s.ms/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20150907/c1751060/attachment.sig>


More information about the PyQt mailing list