Re: [Zope] can't pickle instancemethod objects in testcase

2008-01-13 Thread Peter Bengtsson
Thanks Andreas and Dieter, The explanation was quite simple, I set an attribute on an object that was a method like this:: class TestBase(ZopeTestCase.ZopeTestCase): def dummy_redirect(self, *a, **kw): self.has_redirected = a[0] if kw: print *** Redirecting to %r

Re: [Zope] can't pickle instancemethod objects in testcase

2008-01-08 Thread Dieter Maurer
Peter Bengtsson wrote at 2008-1-7 18:29 +: My code works fine in normal running zope but not when run as a testcase (I'm not using bin/zopectl test if that matters) I get the following error. I feel guilty since I've got this line in my code: transaction.get().commit() (Expense.py#4458) I

[Zope] can't pickle instancemethod objects in testcase

2008-01-07 Thread Peter Bengtsson
My code works fine in normal running zope but not when run as a testcase (I'm not using bin/zopectl test if that matters) I get the following error. I feel guilty since I've got this line in my code: transaction.get().commit() (Expense.py#4458) I remember having come across this error before

Re: [Zope] can't pickle instancemethod objects in testcase

2008-01-07 Thread Andreas Jung
--On 7. Januar 2008 18:29:50 + Peter Bengtsson [EMAIL PROTECTED] wrote: My code works fine in normal running zope but not when run as a testcase (I'm not using bin/zopectl test if that matters) I get the following error. I feel guilty since I've got this line in my code:

Re: [Zope] can't pickle instancemethod objects in testcase

2008-01-07 Thread Peter Bengtsson
Andreas Jung wrote: --On 7. Januar 2008 18:29:50 + Peter Bengtsson [EMAIL PROTECTED] wrote: My code works fine in normal running zope but not when run as a testcase (I'm not using bin/zopectl test if that matters) I get the following error. I feel guilty since I've got this line in

Re: [Zope] can't pickle instancemethod objects in testcase

2008-01-07 Thread Andreas Jung
--On 7. Januar 2008 19:17:06 + Peter Bengtsson [EMAIL PROTECTED] wrote: Damn it! Not the answer I was hoping for. I was hoping for something simpler and more obvious :) What object do you suggest I inspect in the debugger then? I don't know how the ZODB figures out what it needs to save.