- fix to module_directory path generation when the path is "./" [ticket:34]
diff --git a/CHANGES b/CHANGES index cb727c5..ef8c322 100644 --- a/CHANGES +++ b/CHANGES
@@ -1,3 +1,7 @@ +0.1.6 +- fix to module_directory path generation when the path is "./" + [ticket:34] + 0.1.5 - AST expression generation - added in just about everything expression-wise from the AST module [ticket:26]
diff --git a/lib/mako/template.py b/lib/mako/template.py index 07efbd6..6dc2603 100644 --- a/lib/mako/template.py +++ b/lib/mako/template.py
@@ -59,7 +59,7 @@ u = self.uri if u[0] == '/': u = u[1:] - path = os.path.normpath(os.path.join(module_directory.replace('/', os.path.sep), u + ".py")) + path = os.path.abspath(os.path.join(module_directory.replace('/', os.path.sep), u + ".py")) else: path = None if path is not None:
diff --git a/test/template.py b/test/template.py index 6baac1c..730f654 100644 --- a/test/template.py +++ b/test/template.py
@@ -250,8 +250,8 @@ file('./test_htdocs/subdir/modtest.html', 'w').write("""this is a test""") t = Template(filename='./test_htdocs/modtest.html', module_directory='./test_htdocs/modules') t2 = Template(filename='./test_htdocs/subdir/modtest.html', module_directory='./test_htdocs/modules') - assert t.module.__file__ == os.path.normpath('./test_htdocs/modules/test_htdocs/modtest.html.py') - assert t2.module.__file__ == os.path.normpath('./test_htdocs/modules/test_htdocs/subdir/modtest.html.py') + assert t.module.__file__ == os.path.abspath('./test_htdocs/modules/test_htdocs/modtest.html.py') + assert t2.module.__file__ == os.path.abspath('./test_htdocs/modules/test_htdocs/subdir/modtest.html.py') def test_callable(self): file('./test_htdocs/modtest.html', 'w').write("""this is a test""") file('./test_htdocs/subdir/modtest.html', 'w').write("""this is a test""")