[PyQt] Testing PyQt using code with unit-tests and Mock

Andreas Pakulat apaku at gmx.de
Wed Jul 27 20:31:22 BST 2011


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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: dummy.py
Type: text/x-python
Size: 563 bytes
Desc: not available
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20110727/965d88e0/attachment.py>


More information about the PyQt mailing list