Issue #127 invalid

py.test doesn't wait for deferred completion when using twisted.trial

Ali Afshar
created an issue

Twisted.trial unittests have an additional feature where if they return a deferred, the deferred will be waited on until completed. This behaviour is present in the base TestCase class twisted.trial.unittest.TestCase. These deferreds are not currently waited on in py.test.

Additionally, some twisted unittests are presented as generators decorated by twisted.internet.defer.inlineCallbacks in which yield yields a deferreds. These generators should be iterated to completion and all generators waited upon for completion.

This is just a placeholder, as I should investigate this myself, and add more information to this ticket.

Comments (2)

  1. pere_martir4

    I wonder if py.test is supposed to support twisted.trial.unittest.TestCase ? It would end up with implementing everything with the reactor, wouldn't it ?

  2. holger krekel repo owner

    py.test can run twisted.trial.unittest.TestCase as long as there are no deferreds involved (people use this). There is no reactor integration though. I guess it's possible but i haven't cared for that myself so far. If you like to keep this as a feature request please re-open the issue on the pytest tracker - the py-trunk is really only there for historic reasons. thanks holger

  3. Log in to comment