[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyQt] Testing PyQt using code with unit-tests and Mock
From:       Andreas Pakulat <apaku () gmx ! de>
Date:       2011-07-28 6:57:16
Message-ID: 20110728065716.GA28722 () trinity ! apaku ! dnsalias ! org
[Download RAW message or body]

On 27.07.11 22:19:43, Phil Thompson wrote:
> On Wed, 27 Jul 2011 21:31:22 +0200, Andreas Pakulat <apaku@gmx.de> wrote:
> > Hi,
> > 
> > I've got a bit of a problem to test my PyQt based code via unit-tests
> > involving mock objects (specifically minimock).
> > 
> > I'd like to find a way to emit a signal with a mock-object instead of
> > the real, but I can't seem to find a way to do that. The attached
> > example demonstrates the problem. Instead of a real Param object I want
> > to pass in a Mock object
> > 
> > Is there a way to do this?
> > 
> > PyQt 4.8.3, Qt 4.7.3 and sip 4.12.1
> > 
> > Andreas
> 
> If the question is "can you dynamically change a QMetaObject", then the
> answer is no.

I see. Guess I'll have to create a subclass for the test than which
re-defines the signal parameter...

Andreas

_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic