unicode in doctests

B

Bjorn Tillenius

I'm trying to combine documentation and testing, by using DocFileSuite
from Python 2.4. But the problem is that I need to write non-ascii
characters in the test, and I can't get it to work. I haven't found a
way to specify which encoding the file is in, so it gets decoded to
unicode.

Anyone know if it's possible at all to use non-ascii character in a
DocFileSuite?

For example, this fails:
u'föö'

BTW, I know that I can use \-notation, but since the test will serve as
documentation as well, I don't want to use it.

Regards,

Bjorn
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,229
Latest member
GloryAngul

Latest Threads

Top