On Sun, Jun 14, 2009 at 3:39 PM, Phil Thompson <[email protected]>wrote:
> On Sun, 14 Jun 2009 13:09:42 +0200, Arve Knudsen <[email protected]> > wrote: > > Seems like I'm on a roll right now .. I have a case which crashes PyQt > 4.5 > > under debug-built Python 2.6 on Ubuntu 9.04 x86-64. The attached script > > contains the case, and backtrace.txt gdb's backtrace output. > > > > The case is extracted from a unit test of mine, and I've simply pasted > code > > from a mock module which it depends on, so there's a lot of cruft in the > > file. What matters is the class "Test", and apparently what triggers the > > crash is its assignment of the variable "_qbase". > > > > It is possible that my QMock class confuses PyQt in some way, but I guess > > it > > shouldn't crash :) > > It's not crashing, it's an assertion failure. > > It's checking that an attribute with a particular special name is a list > and failing if not. In your test it is a MockCallable instance instead. > > I could remove the assertion and just silently ignore anything that is an > unexpected type - but I'm not sure if that breaks your mock object. OK, thanks for pointing this out. I could try to modify my Mock class to recognize and ignore special attributes like this. Thanks! Arve
_______________________________________________ PyQt mailing list [email protected] http://www.riverbankcomputing.com/mailman/listinfo/pyqt
