Hello, I think automagic things are evil.
Later if you realize that you don't need them you have to fight to get rid of them. Tuesday, August 25, 2009, 4:19:30 PM, you wrote: JWK> Adam GROSZER wrote: >> Hello, >> >> I'd rather use a mailer stub for testing. >> Like the one in zope.sendmail.tests.test_mailer.py >> >> ... >> class SMTP(object): >> ... >> >> Something like this can be setup for individual tests with >> >> <utility >> name="mailer-name" >> provides="zope.sendmail.interfaces.IMailer" >> factory="your.own.mailerFactory" >> /> >> >> def mailerFactory(): >> mailer = SMTPMailer() >> mailer.smtp = SMTP >> return mailer JWK> Right, I see. However, what I meant to ask is if there is a way to have JWK> the registration of such a stub to be more or less automagically done JWK> during test runs by the zope.sendmail package instead of having to think JWK> about this over and over again in the packages directly or indirectly JWK> depending on it. JWK> I *thought* to see a way of getting rid of global data in JWK> zope.testing.cleanup, and I wonder if we could think of a way to set up JWK> global data in a similar manner JWK> regards, JWK> jw JWK> _______________________________________________ JWK> Zope-Dev maillist - Zope-Dev@zope.org JWK> http://mail.zope.org/mailman/listinfo/zope-dev JWK> ** No cross posts or HTML encoding! ** JWK> (Related lists - JWK> http://mail.zope.org/mailman/listinfo/zope-announce JWK> http://mail.zope.org/mailman/listinfo/zope ) -- Best regards, Adam GROSZER mailto:agros...@gmail.com -- Quote of the day: Success without honor is an unseasoned dish; it will satisfy your hunger, but it won't taste good. - Joe Paterno _______________________________________________ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )