<html><head><meta name="qrichtext" content="1" /></head><body style="font-size:12pt;font-family:Trebuchet MS">
<p>&gt; Currently I have the following problem: my test script hangs.</p>
<p>&gt; Via simplification I got to the following text (requires some</p>
<p>&gt; postgres database):</p>
<p>&gt;</p>
<p>&gt;  def setUp(self):</p>
<p>&gt;      self.dbpool = adbapi.ConnectionPool('psycopg', DSN)</p>
<p>&gt;      # (populating some test data)</p>
<p>&gt;      deferredResult( self.dbpool.runInteraction(self._insertTestData) ) </p>
<p></p>
<p>Hmm, replying to myself, it seems that when I changed to </p>
<p></p>
<p>   def setUp(self):</p>
<p>      self.dbpool = adbapi.ConnectionPool('psycopg', DSN)</p>
<p>      return self.dbpool.runInteraction(self._insertTestData)</p>
<p></p>
<p>my test seems to work. Could anyone confirm that setUp (and tearDown) are also allowed to return deferreds?</p>
<p></p>
<p>I have also another problem. In fact I need to run a few deferred-returning functions within setUp. How should I join them? I can create DeferredList but will it then be checked for failures?</p>
<p></p>
</body></html>