summaryrefslogtreecommitdiff
path: root/test/test_template.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2021-10-25 11:54:10 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2021-10-25 12:35:27 -0400
commit3fae86f10914c11c89d4c272fda792da6c61eb51 (patch)
tree9b59b7377ad06c68474e298ab0f40e2be29042ca /test/test_template.py
parenta1d70afb5974125a1a65f590418c7c371bbdb3e6 (diff)
downloadmako-3fae86f10914c11c89d4c272fda792da6c61eb51.tar.gz
more code updates
- 2021 copyright - remove unneeded compat functions - remove unneeded filter constructs - bytestring_passthrough mode doesn't actually do anything, as Py3k StringIO doesn't accept bytes in any case, remove this - should we call ourselves 2.0 and do semver ? Change-Id: I8a8cb5e78037b758e58c87d5d7b4f66b6c211419
Diffstat (limited to 'test/test_template.py')
-rw-r--r--test/test_template.py27
1 files changed, 1 insertions, 26 deletions
diff --git a/test/test_template.py b/test/test_template.py
index 4b0d271..715bc4c 100644
--- a/test/test_template.py
+++ b/test/test_template.py
@@ -188,8 +188,7 @@ class EncodingTest(TemplateTest):
)
def test_unicode_text_ccall(self):
- val = (
- """
+ val = """
<%def name="foo()">
${capture(caller.body)}
</%def>
@@ -198,7 +197,6 @@ class EncodingTest(TemplateTest):
quand une drôle de petite voix m’a réveillé. Elle disait:
« S’il vous plaît… dessine-moi un mouton! »</%text>
</%call>"""
- )
self._do_memory_test(
("## -*- coding: utf-8 -*-\n" + val).encode("utf-8"),
(
@@ -349,29 +347,6 @@ quand une drôle de petite voix m’a réveillé. Elle disait:
template_args={"f": lambda x: x},
)
- def test_raw_strings(self):
- """test that raw strings go straight thru with default_filters
- turned off, bytestring_passthrough enabled.
-
- """
-
- self._do_memory_test(
- ("## -*- coding: utf-8 -*-\nhello ${x}"),
- "hello śląsk",
- default_filters=[],
- template_args={"x": "śląsk"},
- unicode_=False,
- bytestring_passthrough=True,
- output_encoding=None, # 'ascii'
- )
-
- # now, the way you *should* be doing it....
- self._do_memory_test(
- ("## -*- coding: utf-8 -*-\nhello ${x}"),
- ("hello śląsk"),
- template_args={"x": ("śląsk")},
- )
-
def test_encoding(self):
self._do_memory_test(
(