[Zope3-dev] doctest, functional doctests and pep263 encoding

Sidnei da Silva sidnei at enfoldsystems.com
Thu Jun 22 13:48:42 EDT 2006


Looks like Jim added support for pep263 coding to doctest.py at some point.

However, that doesn't quite play with functional doctests it seems.

The issue is that functional doctests usually do:

  >>> print http(r"....

... and when the response value is printed it's converted to a
string. But if you set coding in your functional doctest file then the
expected value is a unicode string. If you have a non-ascii char in
your response value, *bang*, it bombs with a unicode error.

Anyone else experienced this?

-- 
Sidnei da Silva
Enfold Systems                http://enfoldsystems.com
Fax +1 832 201 8856     Office +1 713 942 2377 Ext 214


More information about the Zope3-dev mailing list