summaryrefslogtreecommitdiff
path: root/test/test_template.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2015-03-25 15:44:32 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2015-03-25 15:44:32 -0400
commit8aa06118c84036c6bdbe26a3bcefc53b8a618739 (patch)
treeedc74ec73a2cc808f684377d104707a136ddc2cd /test/test_template.py
parent52e8c0a3deaae9017c76a17196aeac8b027b933e (diff)
downloadmako-8aa06118c84036c6bdbe26a3bcefc53b8a618739.tar.gz
- ensure that STOP_RENDERING is set up everywhere it needs to be
Diffstat (limited to 'test/test_template.py')
-rw-r--r--test/test_template.py24
1 files changed, 13 insertions, 11 deletions
diff --git a/test/test_template.py b/test/test_template.py
index a6a491f..f551230 100644
--- a/test/test_template.py
+++ b/test/test_template.py
@@ -1264,13 +1264,13 @@ Text
eq_(
ModuleInfo.get_module_source_metadata(t.code, full_line_map=True),
{
- 'full_line_map': [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,
- 0, 0, 0, 0, 0, 0, 1, 4, 5, 5, 5, 7, 8,
- 8, 8, 8, 8, 8, 8],
+ 'full_line_map': [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 4, 5, 5, 5, 7,
+ 8, 8, 8, 8, 8, 8, 8],
'source_encoding': 'ascii',
'filename': None,
- 'line_map': {34: 28, 14: 0, 21: 1, 22: 4, 23: 5, 24: 5,
- 25: 5, 26: 7, 27: 8, 28: 8},
+ 'line_map': {35: 29, 15: 0, 22: 1, 23: 4, 24: 5, 25: 5,
+ 26: 5, 27: 7, 28: 8, 29: 8},
'uri': '/some/template'
}
@@ -1293,17 +1293,19 @@ Text
eq_(
ModuleInfo.get_module_source_metadata(t.code, full_line_map=True),
{
- 'full_line_map': [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 4, 5, 5, 5, 7, 7, 7,
- 7, 7, 10, 10, 10, 10, 10, 10, 8, 8, 8, 8, 8,
- 8, 8, 8, 8, 8, 8, 8],
+ 'full_line_map': [
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 4, 5, 5, 5, 7, 7,
+ 7, 7, 7, 10, 10, 10, 10, 10, 10, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8],
'source_encoding': 'ascii',
'filename': None,
- 'line_map': {33: 10, 39: 8, 45: 8, 14: 0, 51: 45, 23: 1,
- 24: 4, 25: 5, 26: 5, 27: 5, 28: 7},
+ 'line_map': {34: 10, 40: 8, 46: 8, 15: 0, 52: 46,
+ 24: 1, 25: 4, 26: 5, 27: 5, 28: 5, 29: 7},
'uri': '/some/template'}
)
+
class PreprocessTest(TemplateTest):
def test_old_comments(self):
t = Template("""