[Twisted-Python] Re: Reactor is left dirty after calling twisted.mail.smtp.sendmail via trial
michal.dtz at gmail.com
Tue Feb 26 08:23:56 EST 2008
Dnia 2008-02-26, o godz. 12:26:22
Marcin Kasperski <Marcin.Kasperski at softax.com.pl> napisał(a):
> > class Test1(unittest.TestCase):
> > def test_sendmail(self):
> > return smtp.sendmail('localhost', 'foo at bar.pl',
> > 'dotz at localhost', 'this leaves reactor
> > dirty :-(').addCallback(evenIfCallbackIsCalled)
> Adding callback should have no meaning here, you need to return
> deferred from test to sync with that whether the processing is
> complicated or simple.
I am using trial to run the tests - if I did that the other way, how
would I get an exception about unclean reactor? :-)
The last time I checked, addCallback did return a Deferred, in fact it
was returning 'self', so I really don't think it's the case here.
Am I wrong?
More information about the Twisted-Python