[Twisted-Python] Re: Reactor is left dirty after calling twisted.mail.smtp.sendmail via trial
Michał Pasternak
michal.dtz at gmail.com
Tue Feb 26 06:23:56 MST 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?
--
m
More information about the Twisted-Python
mailing list