[Twisted-Python] problems with trial and adbapi
Dave Peticolas
dave at krondo.com
Sun Sep 19 17:50:51 MDT 2004
On Sun, 2004-09-19 at 12:44, donfu wrote:
> Dear Twisters
>
> I'm diving into the twisted matrix. Mostly really enjoying it, but
> sometimes it's a tough ground :)
>
> Now i'm trying to set up unittests with trial for a small twisted
> datastore. the store itself works outside of trial, but strange things
> happen when running the tests.
>
> The first thing I had to learn, is to explicitly start the dbpool with
> dbpool.start(). Now the tests work sometimes, but sometimes not. I
> guess the problem has something to do with adbapi's usage of threads
> and my using of 'deferredResult()' in the tests.
deferredResult should work just fine, I use it all the
time with db-related tests. Are you calling db.close()
after the tests are done?
dave
More information about the Twisted-Python
mailing list