[Zope-dev] [Checkins] SVN: zope.app.testing/trunk/ Switch doctests to use the stdlib ``doctest`` module.
Adam GROSZER
agroszer at gmail.com
Thu Jun 3 11:36:03 EDT 2010
Hello Tres,
Thursday, June 3, 2010, 5:29:41 PM, you wrote:
TS> -----BEGIN PGP SIGNED MESSAGE-----
TS> Hash: SHA1
TS> Adam GROSZER wrote:
>>> Log message for revision 110723:
>>> Switch doctests to use the stdlib ``doctest`` module.
>>>
>>> o Disuse than the deprecated ``zope.testing.doctest`` variant.
>>>
>>> Remove a duplicated import.
>>>
>>>
>>> Changed:
>>> U zope.app.testing/trunk/CHANGES.txt
>>> U zope.app.testing/trunk/src/zope/app/testing/functional.py
>>> U zope.app.testing/trunk/src/zope/app/testing/tests.py
>>
>> The problem with this is that it just breaks tests that have accented
>> unicode characters.
>>
>> zope.app.testing.functional.FunctionalDocFileSuite breaks, while
>> zope.testing.doctest.DocFileSuite works.
>> I don't remember what was the final decision on deprecating
>> zope.testing.doctest, but this definitely s*cks.
>>
>> Thoughts?
TS> What tests are breaking?
Our apps's tests.
Excerpt is:
# -*- coding: UTF-8 -*-
<snip>
>>> mail = mailer.prepareEmail(u"Some subject",
... u"Some body éáÉÁ",
... u"from at me.com",
... u"to at you.com")
<snip>
With the stdlib doctest prepareEmail gets
u'Some body \xc3\xa9\xc3\xa1\xc3\x89\xc3\x81'
Note, it's unicode() and utf-8 encoded at the same time.
I guess stdlib doctest does not care about # -*- coding: UTF-8 -*-
--
Best regards,
Adam GROSZER mailto:agroszer at gmail.com
--
Quote of the day:
A physicist is an atom's way of knowing about atoms. -- George Wald
More information about the Zope-Dev
mailing list