[Zope-Coders] Unit testing issues
Jeremy Hylton
jeremy@zope.com
Fri, 9 Nov 2001 12:26:31 -0500 (EST)
>>>>> "MTK" == Matthew T Kromer <matt@zope.com> writes:
MTK> Testrunner is running some test which is doing something to
MTK> Zope.app() I think which is screwing me up when I'm importing
MTK> Zope. I haven't yet figured out a good way of isolating that;
MTK> I was considering looking to see if maybe there ought to be
MTK> some support for closing down the root database and reopening
MTK> it, but that feels like some kind of overkill...
Here's a little more information about why one specific test is
failing. I don't understand what's happening at all:
testZEO.ZEOFileStorageTests runs a test method defined in
ZODB.tests.BasicStorage -- getSerial(). This test should be a no-op
for ZEO, because ClientStorage doesn't define getSerial(). The first
thing that the test does is
if not hasattr(self._storage, 'getSerial'):
return
Well, if ZEO gets run at the end of the test, the hasattr succeeds.
I printed the repr of self._storage.getSerial and it was:
<Python Method object at 0x9202000>
What's a Python Method object? And how did it get in my instance?
Jeremy