Peter Bengtsson wrote at 2008-4-8 19:08 +0100: > ... >The reason it fails on the last line is that the time difference >between the first time and the second time is nil. Adding a >time.sleep(1) won't change anything because the >bobobase_modification_time() doesn't change. > >How can I solve this?
Not easy. "bobobase_modification_time()" is in fact a "DateTime" representation of "_p_serial". And "_p_serial" is the transaction id (also a timestamp) that has committed the object state belonging to this object incarnation. Unfortunately, you must not commit a transaction in a test suite (as this may cause interference with other tests). There is a small chance that a savepoint changed "_p_serial" -- but the chance is only small... You might be able to write "_p_serial" yourself and thereby trick "bobobase_modification_time()". -- Dieter _______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )