[PyQt] Testing PyQt using code with unit-tests and Mock
phil at riverbankcomputing.com
Wed Jul 27 22:19:43 BST 2011
On Wed, 27 Jul 2011 21:31:22 +0200, Andreas Pakulat <apaku at gmx.de> wrote:
> 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
If the question is "can you dynamically change a QMetaObject", then the
answer is no.
More information about the PyQt