changeset 863:72d56a8441e8

Make the output tests skip the encoding step.
author cmlenz
date Thu, 12 Nov 2009 21:01:08 +0000
parents 37fb3988647a
children 266aa2e347f5
files genshi/output.py
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/genshi/output.py
+++ b/genshi/output.py
@@ -26,6 +26,7 @@
            'XHTMLSerializer', 'HTMLSerializer', 'TextSerializer']
 __docformat__ = 'restructuredtext en'
 
+
 def encode(iterator, method='xml', encoding='utf-8', out=None):
     """Encode serializer output into a string.
     
@@ -57,6 +58,7 @@
     for chunk in iterator:
         out.write(_encode(chunk))
 
+
 def get_serializer(method='xml', **kwargs):
     """Return a serializer object for the given method.
     
@@ -542,14 +544,15 @@
     that markup is by default passed through unchanged:
     
     >>> elem = tag.div(Markup('<a href="foo">Hello &amp; Bye!</a><br/>'))
-    >>> print(elem.generate().render(TextSerializer))
+    >>> print(elem.generate().render(TextSerializer, encoding=None))
     <a href="foo">Hello &amp; Bye!</a><br/>
     
     You can use the ``strip_markup`` to change this behavior, so that tags and
     entities are stripped from the output (or in the case of entities,
     replaced with the equivalent character):
 
-    >>> print(elem.generate().render(TextSerializer, strip_markup=True))
+    >>> print(elem.generate().render(TextSerializer, strip_markup=True,
+    ...                              encoding=None))
     Hello & Bye!
     """
 
Copyright (C) 2012-2017 Edgewall Software