[Zope] Exploring non always repeating tracebacks in test case
Marco Bizzarri
marco.bizzarri at gmail.com
Tue Jan 2 23:32:30 EST 2007
Hi all.
I'm trying to explore the possible reasons behind some strange
traceback which on some conditions (unknown to me at the moment)
appears while running my ZopeTestCases.
When I run all my tests, sometimes I get no error. Sometimes I get
from 3 to 5 tracebacks, all related to the same part of the code. Here
is one of those tracebacks.
ERROR: testActIntegration.DeterminationTestCase.testProposal
----------------------------------------------------------------------
Traceback (most recent call last):
File "testActIntegration.py", line 106, in testProposal
draft.fromScratch(AUTHOR)
File "/var/local/zope27/paflow/zeoclient/Products/PAFlow/Acts.py",
line 1298, in fromScratch
self.makeDocumentUsingData()
File "/var/local/zope27/paflow/zeoclient/Products/PAFlow/Acts.py",
line 1085, in makeDocumentUsingData
'application/pdf')
File "/var/local/zope27/paflow/zeoclient/Products/PAFlow/Documents.py",
line 676, in setBinaryFileType
self.updateData(file, content_type)
File "/var/local/zope27/paflow/zeoclient/Products/PAFlow/Documents.py",
line 558, in updateData
data, size = self._read_data(file)
File "/var/local/zope27/base278/lib/python/OFS/Image.py", line 518,
in _read_data
get_transaction().commit(1)
File "/var/local/zope27/base278/lib/python/ZODB/Transaction.py",
line 241, in commit
ncommitted += self._commit_objects(objects)
File "/var/local/zope27/base278/lib/python/ZODB/Transaction.py",
line 356, in _commit_objects
jar.commit(o, self)
File "/var/local/zope27/base278/lib/python/ZODB/Connection.py", line
452, in commit
dump(state)
File "/usr/lib/python2.3/copy_reg.py", line 69, in _reduce_ex
raise TypeError, "can't pickle %s objects" % base.__name__
TypeError: can't pickle function objects
Of course, there is a lot of my code here, so basically I'm not asking
about the problem, but on how I could further explore the problem
(aside from putting a conditional break in the code and run the tests
until it is activated).
Another (related) question is related to the following snippet, from OFS.Image:
File "/var/local/zope27/base278/lib/python/OFS/Image.py", line 518,
in _read_data
get_transaction().commit(1)
Here we have therefore a subtransaction committed. This worries me a
lot, since my code deals, at the same time, with PostgreSQL database
and ZCatalog. In the ZCatalog, the subtransactions where disabled
since they were not compatible with PostgreSQL.
I think there is a similar issue with subtransaction in Image... am I wrong?
Regards
Marco
--
Marco Bizzarri
http://iliveinpisa.blogspot.com/
More information about the Zope
mailing list