~landscape/zope3/newer-from-ztk

« back to all changes in this revision

Viewing changes to src/zope/testing/testrunner/testrunner-ex/unicode.txt

  • Committer: Thomas Hervé
  • Date: 2009-09-21 16:46:07 UTC
  • Revision ID: thomas@canonical.com-20090921164607-sky3xhlt02ji80ka
Revert r8: regression with test failures

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
=========================
2
 
Errors Containing Unicode
3
 
=========================
4
 
 
5
 
There was a unicode bug. Create a function which returns a unicode string with
6
 
non us-ascii characters::
7
 
 
8
 
    >>> def get_unicode():
9
 
    ...    return u'foo \u2014 bar'
10
 
    >>> print get_unicode()
11
 
    oink
12
 
 
13
 
There was another unicode bug. When a function returned unicode some internal
14
 
state switched. This broke any further test not returning unicode but a plain
15
 
string with unicode characters. Make sure this works now::
16
 
 
17
 
    >>> get_unicode()
18
 
    u'foo \u2014 bar'
19
 
    >>> print get_unicode()
20
 
    foo — bar
21
 
 
22
 
 
23
 
Get some normal output as well::
24
 
 
25
 
    >>> 'xyz'
26
 
    123
27