diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2011-02-21 11:45:24 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2011-02-21 11:45:24 -0500 |
commit | 76f27c8002f7200a12a23e2b6f5dd7a38bc4c293 (patch) | |
tree | 87fe19a195cf40d35df5c1ce1cec229753d82bc3 /test/test_template.py | |
parent | 1936fc61ef6d61b32324fbdc1e49b44241473b62 (diff) | |
download | mako-76f27c8002f7200a12a23e2b6f5dd7a38bc4c293.tar.gz |
- the "ascii encoding by default" approach doesn't work in Py3K,
because a string and an ascii encoded string are of course
different things, and we'd like render() by default to return a
string. So go the other way, use FEB in all cases,
add a new flag bytestring_passthrough which goes back to StringIO,
to support that one guy who wanted to force a bytestring through
in an expression.
Diffstat (limited to 'test/test_template.py')
-rw-r--r-- | test/test_template.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/test_template.py b/test/test_template.py index 2ac4ad3..e8fd6ed 100644 --- a/test/test_template.py +++ b/test/test_template.py @@ -283,7 +283,10 @@ class EncodingTest(TemplateTest): ) def test_raw_strings(self): - """test that raw strings go straight thru with default_filters turned off""" + """test that raw strings go straight thru with default_filters turned off, + bytestring_passthrough enabled. + + """ self._do_memory_test( u"## -*- coding: utf-8 -*-\nhello ${x}", @@ -291,6 +294,7 @@ class EncodingTest(TemplateTest): default_filters=[], template_args={'x':'śląsk'}, unicode_=False, + bytestring_passthrough=True, output_encoding=None #'ascii' ) |