[Epydoc-commits] SF.net SVN: epydoc: [1630] trunk/epydoc/src/epydoc/test/pyval_repr.doctest
Brought to you by:
edloper
From: <ed...@us...> - 2007-09-24 01:01:15
|
Revision: 1630 http://epydoc.svn.sourceforge.net/epydoc/?rev=1630&view=rev Author: edloper Date: 2007-09-23 18:01:14 -0700 (Sun, 23 Sep 2007) Log Message: ----------- - Updated test to reflect that colorization of '\uaaaa' in a string now generates an xml charref in the output, not a python escape Modified Paths: -------------- trunk/epydoc/src/epydoc/test/pyval_repr.doctest Modified: trunk/epydoc/src/epydoc/test/pyval_repr.doctest =================================================================== --- trunk/epydoc/src/epydoc/test/pyval_repr.doctest 2007-09-24 00:49:36 UTC (rev 1629) +++ trunk/epydoc/src/epydoc/test/pyval_repr.doctest 2007-09-24 01:01:14 UTC (rev 1630) @@ -6,7 +6,10 @@ >>> def color(v, linebreakok=True): ... colorizer = PyvalColorizer(linelen=40, linebreakok=linebreakok) ... pds = colorizer.colorize(v, None) - ... print pds.to_html(None).rstrip() + ... s = pds.to_html(None).rstrip() + ... if isinstance(s, unicode): + ... s = s.encode('ascii', 'xmlcharrefreplace') + ... print s Simple Types ============ @@ -78,7 +81,7 @@ >>> color(u"Hello world") <code class="variable-quote">u'</code><code class="variable-string">Hello world</code><code class="variable-quote">'</code> >>> color(u"\uaaaa And \ubbbb") - <code class="variable-quote">u'</code><code class="variable-string">\uaaaa And \ubbbb</code><code class="variable-quote">'</code> + <code class="variable-quote">u'</code><code class="variable-string">ꪪ And 뮻</code><code class="variable-quote">'</code> Lists, Tuples, etc. =================== @@ -263,15 +266,15 @@ repr: ['hello', 123] score: 3 (ok) - >>> color2(A()) + >>> color2(A()) # doctest: +ELLIPSIS repr: <__builtin__.A instance at ...> score: -4 (bad) - >>> color2([A()]) + >>> color2([A()]) # doctest: +ELLIPSIS repr: [<__builtin__.A instance at ...>] score: -3 (bad) - >>> color2([A(),1,2,3,4,5,6]) + >>> color2([A(),1,2,3,4,5,6]) # doctest: +ELLIPSIS repr: [<__builtin__.A instance at ...>, 1, 2, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |