[Zope] ZopeTestCase testZODBCompat fails :-(

Terry Hancock hancock at anansispaceworks.com
Fri Nov 28 13:53:49 EST 2003


I've recently run into the need to start unit testing code
which needs access to Zope, and it looks like ZopeTestCase
may be the most recent / best way to do this. I currently
have installed:

Python 2.1.3, Zope 2.5.1, ZopeTestCase 0.8.4

I tried installing ZopeTestCase and did the  installation
exactly as described in INSTALL.stx.

I have an INSTANCE_HOME type of Zope installation
with no ZEO and am using filestorage.  I have shut
down my Zope server and set up my environment
correctly as if I were going to start Zope (I know this
works, because I use it routinely to do interactive
testing of new objects when I'm working on them --
from this configuration, I'm able to import Zope, get
the site object (i.e. Zope.app()) etc.).

Running runalltests.py results in an apparently complete
failure of the testZODBCompat tests.  I figure this must
mean there's something unusual about my installation,
or that the instructions for ZopeTestCase are overlooking
something.  The actual report is pasted below.

Is this a common situation? What should I be looking for to 
fix  this?  Does this have to be fixed before I can proceed?

Cheers,
Terry


Actual output from runalltests.py:
SOFTWARE_HOME: /usr/local/narya/z2.5.1/lib/python
INSTANCE_HOME: /usr/local/narya/z2.5.1/lib/python/Testing
Loading Zope, please stand by ... done (2.801s)
Installing PythonScripts ... done (0.074s)
Importing Examples.zexp ... done (3.342s)
.............................EEEEEEEE.......FF..............................................
======================================================================
ERROR: testCOPY (testZODBCompat.TestCopyPaste)
----------------------------------------------------------------------
Traceback (most recent call last):
  File 
"/usr/local/narya/z2.5.1/lib/python/Testing/ZopeTestCase/ZopeTestCase.py", 
line 109, in setUp
    self.afterSetUp()
  File "testZODBCompat.py", line 31, in afterSetUp
    self.assertEqual(self.folder._p_jar, None)
  File "/usr/local/narya/lib/python2.1/unittest.py", line 
273, in failUnlessEqual
    raise self.failureException, (msg or '%s != %s' % 
(first, second))
AssertionError: <ZODB.Connection.Connection instance at 
0x85aa074> != None
======================================================================
ERROR: testClone (testZODBCompat.TestCopyPaste)
----------------------------------------------------------------------
Traceback (most recent call last):
  File 
"/usr/local/narya/z2.5.1/lib/python/Testing/ZopeTestCase/ZopeTestCase.py", 
line 109, in setUp
    self.afterSetUp()
  File "testZODBCompat.py", line 31, in afterSetUp
    self.assertEqual(self.folder._p_jar, None)
  File "/usr/local/narya/lib/python2.1/unittest.py", line 
273, in failUnlessEqual
    raise self.failureException, (msg or '%s != %s' % 
(first, second))
AssertionError: <ZODB.Connection.Connection instance at 
0x85aa074> != None
======================================================================
ERROR: testCopyPaste (testZODBCompat.TestCopyPaste)
----------------------------------------------------------------------
Traceback (most recent call last):
  File 
"/usr/local/narya/z2.5.1/lib/python/Testing/ZopeTestCase/ZopeTestCase.py", 
line 109, in setUp
    self.afterSetUp()
  File "testZODBCompat.py", line 31, in afterSetUp
    self.assertEqual(self.folder._p_jar, None)
  File "/usr/local/narya/lib/python2.1/unittest.py", line 
273, in failUnlessEqual
    raise self.failureException, (msg or '%s != %s' % 
(first, second))
AssertionError: <ZODB.Connection.Connection instance at 
0x85aa074> != None
======================================================================
ERROR: testCutPaste (testZODBCompat.TestCopyPaste)
----------------------------------------------------------------------
Traceback (most recent call last):
  File 
"/usr/local/narya/z2.5.1/lib/python/Testing/ZopeTestCase/ZopeTestCase.py", 
line 109, in setUp
    self.afterSetUp()
  File "testZODBCompat.py", line 31, in afterSetUp
    self.assertEqual(self.folder._p_jar, None)
  File "/usr/local/narya/lib/python2.1/unittest.py", line 
273, in failUnlessEqual
    raise self.failureException, (msg or '%s != %s' % 
(first, second))
AssertionError: <ZODB.Connection.Connection instance at 
0x85aa074> != None
======================================================================
ERROR: testMOVE (testZODBCompat.TestCopyPaste)
----------------------------------------------------------------------
Traceback (most recent call last):
  File 
"/usr/local/narya/z2.5.1/lib/python/Testing/ZopeTestCase/ZopeTestCase.py", 
line 109, in setUp
    self.afterSetUp()
  File "testZODBCompat.py", line 31, in afterSetUp
    self.assertEqual(self.folder._p_jar, None)
  File "/usr/local/narya/lib/python2.1/unittest.py", line 
273, in failUnlessEqual
    raise self.failureException, (msg or '%s != %s' % 
(first, second))
AssertionError: <ZODB.Connection.Connection instance at 
0x85aa074> != None
======================================================================
ERROR: testRename (testZODBCompat.TestCopyPaste)
----------------------------------------------------------------------
Traceback (most recent call last):
  File 
"/usr/local/narya/z2.5.1/lib/python/Testing/ZopeTestCase/ZopeTestCase.py", 
line 109, in setUp
    self.afterSetUp()
  File "testZODBCompat.py", line 31, in afterSetUp
    self.assertEqual(self.folder._p_jar, None)
  File "/usr/local/narya/lib/python2.1/unittest.py", line 
273, in failUnlessEqual
    raise self.failureException, (msg or '%s != %s' % 
(first, second))
AssertionError: <ZODB.Connection.Connection instance at 
0x85aa074> != None
======================================================================
ERROR: testExport (testZODBCompat.TestImportExport)
----------------------------------------------------------------------
Traceback (most recent call last):
  File 
"/usr/local/narya/z2.5.1/lib/python/Testing/ZopeTestCase/ZopeTestCase.py", 
line 109, in setUp
    self.afterSetUp()
  File "testZODBCompat.py", line 81, in afterSetUp
    self.assertEqual(self.folder._p_jar, None)
  File "/usr/local/narya/lib/python2.1/unittest.py", line 
273, in failUnlessEqual
    raise self.failureException, (msg or '%s != %s' % 
(first, second))
AssertionError: <ZODB.Connection.Connection instance at 
0x85aa074> != None
======================================================================
ERROR: testImport (testZODBCompat.TestImportExport)
----------------------------------------------------------------------
Traceback (most recent call last):
  File 
"/usr/local/narya/z2.5.1/lib/python/Testing/ZopeTestCase/ZopeTestCase.py", 
line 109, in setUp
    self.afterSetUp()
  File "testZODBCompat.py", line 81, in afterSetUp
    self.assertEqual(self.folder._p_jar, None)
  File "/usr/local/narya/lib/python2.1/unittest.py", line 
273, in failUnlessEqual
    raise self.failureException, (msg or '%s != %s' % 
(first, second))
AssertionError: <ZODB.Connection.Connection instance at 
0x85aa074> != None
======================================================================
FAIL: testVolatile_02 (testZODBCompat.TestSpecialAttributes)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "testZODBCompat.py", line 190, in testVolatile_02
    self.assertEqual(self.dummy._v_foo, 'foo')
  File "/usr/local/narya/lib/python2.1/unittest.py", line 
273, in failUnlessEqual
    raise self.failureException, (msg or '%s != %s' % 
(first, second))
AssertionError: None != foo
======================================================================
FAIL: testVolatile_03 (testZODBCompat.TestSpecialAttributes)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "testZODBCompat.py", line 195, in testVolatile_03
    self.assertEqual(self.dummy._v_foo, 'bar')
  File "/usr/local/narya/lib/python2.1/unittest.py", line 
273, in failUnlessEqual
    raise self.failureException, (msg or '%s != %s' % 
(first, second))
AssertionError: None != bar
----------------------------------------------------------------------
Ran 92 tests in 3.741s

FAILED (failures=2, errors=8)

--
Terry Hancock ( hancock at anansispaceworks.com )
Anansi Spaceworks  http://www.anansispaceworks.com



More information about the Zope mailing list