diff options
| author | Joachim Krebs <joachim@jkrebs.com> | 2010-12-16 01:27:25 +0000 |
|---|---|---|
| committer | Joachim Krebs <joachim@jkrebs.com> | 2010-12-16 01:27:25 +0000 |
| commit | b4675031ed9b2313e9df5cd73dc2575bec67192b (patch) | |
| tree | d7db1359ae0bcad54af97ab00f29e2edf905f36f | |
| parent | a2796fab049dbc58e36b9cd1fdbbf1c537089289 (diff) | |
| download | pyramid-b4675031ed9b2313e9df5cd73dc2575bec67192b.tar.gz pyramid-b4675031ed9b2313e9df5cd73dc2575bec67192b.tar.bz2 pyramid-b4675031ed9b2313e9df5cd73dc2575bec67192b.zip | |
Fixed relative path test for Mako templates, enabling non-setup.py test runners.
| -rw-r--r-- | pyramid/tests/test_mako_templating.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/pyramid/tests/test_mako_templating.py b/pyramid/tests/test_mako_templating.py index 4d1c49863..85423b588 100644 --- a/pyramid/tests/test_mako_templating.py +++ b/pyramid/tests/test_mako_templating.py @@ -3,6 +3,9 @@ import unittest from pyramid import testing +import sys +import os.path + class Base(object): def setUp(self): self.config = testing.setUp() @@ -70,7 +73,10 @@ class Test_renderer_factory(Base, unittest.TestCase): }) self._callFUT(info) lookup = self.config.registry.getUtility(IMakoLookup) - self.assertEqual(lookup.directories, ['a', 'b']) + module_path = os.path.dirname(sys.modules['__main__'].__file__) + self.assertEqual(lookup.directories, [ + os.path.join(module_path, 'a'), + os.path.join(module_path, 'b')]) def test_with_module_directory_resource_spec(self): import os |
