[z3-five] Re: getting the tests to run

Tres Seaver tseaver at zope.com
Fri Aug 27 19:25:51 MEST 2004


Martijn Faassen wrote:
> Tres Seaver wrote:
> 
>> Do you have a document describing how you expect the tests to be run? 
> 
> 
> Have you looked at README.txt in the tests directory? The system makes 
> use of ZopeTestCase and requires the FiveTest product to be installed. I 
> do not think things will run with other test runners than 
> runalltests.py. From your experiments it looks like you're trying to use 
> a different test framework altogether.

I'm trying to use Zope's test.py.  No matter, I will try running 
'runalltests.py' directly instead.

> I'm used to ZopeTestCase, which 
> is heavily used by Plone and Silva among other projects.
> 
> Anyway, what should be enough is setting INSTANCE_HOME, SOFTWARE_HOME, 
> and PYTHONPATH (to include Zope 3, or alternatively set it in your 
> zope.conf), and then:
> 
> python2.3 runalltests.py

OK, here is what I have done now:

   $ cd $INSTANCE_HOME/Products
   $ ln -s Five/tests/products/FiveTest .
   $ cd $INSTANCE_HOME
   $ PYTHONPATH="$SOFTWARE_HOME:$INSTANCE_HOME/lib/python" \
     $PROJECT/bin/python Products/Five/tests/runnalltests.py
   SOFTWARE_HOME: /home/tseaver/projects/fivetest/lib/zope2.7/lib/python
   INSTANCE_HOME: /home/tseaver/projects/fivetest/var/appserver
   Installing FiveTest ... done (0.266s)
   Installing Five ... done (0.876s)
   Installing PythonScripts ... done (0.015s)
   ...EEE..............EEE....
   ======================================================================
   ERROR: test_no_permission (test_security2.PublishTestCase)
   ----------------------------------------------------------------------
   Traceback (most recent call last):
     File "test_security2.py", line 106, in test_no_permission
       basic='viewer:secret')
     File 
"/home/tseaver/projects/fivetest/lib/zope2.7/lib/python/Testing/ZopeTestCase/functional.py", 
line 28, in publish
       get_transaction().commit()
     File 
"/home/tseaver/projects/fivetest/lib/zope2.7/lib/python/ZODB/Transaction.py", 
line 236, in commit
       ncommitted += self._commit_objects(objects)
     File 
"/home/tseaver/projects/fivetest/lib/zope2.7/lib/python/ZODB/Transaction.py", 
line 351, in _commit_objects
       jar.commit(o, self)
     File 
"/home/tseaver/projects/fivetest/lib/zope2.7/lib/python/ZODB/Connection.py", 
line 418, in commit
       s=dbstore(oid,serial,p,version,transaction)
     File 
"/home/tseaver/projects/fivetest/lib/zope2.7/lib/python/ZODB/DemoStorage.py", 
line 252, in store
       raise POSException.ConflictError(serials=(oserial, serial))
   ConflictError: database conflict error (serial was 03576eb8b9f31baa, 
now 0000000000000000)

Is it not possible to run ZopeTestCase tests in an instance which uses 
ZEO?  That seems undesirable, to say the least.

Tres.
-- 
===============================================================
Tres Seaver                                tseaver at zope.com
Zope Corporation      "Zope Dealers"       http://www.zope.com



More information about the z3-five mailing list