From 1eb56ef02a7fa825be99ddfb95f217a07dab1cdf Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Sun, 11 Nov 2012 14:38:56 -0500 Subject: - first pass at running a py3k compatible base in py2k as well. having some weird unicode issues I can't debug; the meaning of str.encode() seems to be changing globally somehow --- test/test_def.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test/test_def.py') diff --git a/test/test_def.py b/test/test_def.py index 5c7608f..73c1091 100644 --- a/test/test_def.py +++ b/test/test_def.py @@ -1,7 +1,7 @@ from mako.template import Template from mako import lookup from test import TemplateTest -from util import flatten_result, result_lines +from .util import flatten_result, result_lines from test import eq_, assert_raises class DefTest(TemplateTest): @@ -63,8 +63,8 @@ class DefTest(TemplateTest): """) # check that "a" is declared in "b", but not in "c" - assert "a" not in template.module.render_c.func_code.co_varnames - assert "a" in template.module.render_b.func_code.co_varnames + assert "a" not in template.module.render_c.__code__.co_varnames + assert "a" in template.module.render_b.__code__.co_varnames # then test output eq_( @@ -390,7 +390,7 @@ class ScopeTest(TemplateTest): ${enclosing()} """) try: - print t.render() + print(t.render()) assert False except UnboundLocalError: assert True -- cgit v1.2.3