Skip to content
This repository has been archived by the owner on May 13, 2020. It is now read-only.

Commit

Permalink
failing test for tal:on-error processing
Browse files Browse the repository at this point in the history
  • Loading branch information
leorochael committed Sep 19, 2011
1 parent e17c52d commit daaa9c2
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/five/pt/tests/test_persistenttemplate.py
Expand Up @@ -68,6 +68,12 @@
</tal:block>
""".strip()

tal_onerror_structure_source = """
<tal:block tal:on-error="structure python: '&lt;i&gt;error!&lt;/i&gt;'">
<i tal:content="python: 1/0">
</tal:block>
"""

python_path_source = """
<form tal:attributes="method python:path('context/method')" />
""".strip()
Expand Down Expand Up @@ -209,3 +215,7 @@ def test_lp_848200(self):
# https://bugs.launchpad.net/chameleon.zpt/+bug/848200
template = self._makeOne('foo', lp_848200_source)
self.assertEqual(template().strip(), u'<tag attrib="true" />')

def test_onerror_structure(self):
template = self._makeOne('foo', tal_onerror_structure_source)
self.assertEqual(template().strip(), u'<i>error!</i>')

0 comments on commit daaa9c2

Please sign in to comment.