aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_template.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_template.py')
-rw-r--r--test/test_template.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/test/test_template.py b/test/test_template.py
index 6a617ef..a1ab11e 100644
--- a/test/test_template.py
+++ b/test/test_template.py
@@ -873,6 +873,7 @@ class ControlTest(TemplateTest):
filters=lambda s:s.strip()
)
+ @skip_if(lambda: not util.py26)
def test_blank_control_8(self):
self._do_memory_test(
"""
@@ -970,6 +971,7 @@ class ControlTest(TemplateTest):
filters=lambda s:s.strip()
)
+ @skip_if(lambda: not util.py26)
def test_commented_blank_control_8(self):
self._do_memory_test(
"""
@@ -1093,9 +1095,10 @@ class ModuleDirTest(TemplateTest):
def test_custom_writer(self):
canary = []
def write_module(source, outputpath):
- with open(outputpath, 'wb') as f:
- canary.append(outputpath)
- f.write(source)
+ f = open(outputpath, 'wb')
+ canary.append(outputpath)
+ f.write(source)
+ f.close()
lookup = TemplateLookup(template_base, module_writer=write_module,
module_directory=module_base)
t = lookup.get_template('/modtest.html')