diff options
| author | Chris McDonough <chrism@plope.com> | 2012-03-26 23:56:31 -0400 |
|---|---|---|
| committer | Chris McDonough <chrism@plope.com> | 2012-03-26 23:56:31 -0400 |
| commit | 57835f2edb1592bd3cc0d006de401ace5fc3552c (patch) | |
| tree | 3eb29cc6ce80fd4d3d5167196d2288ad2ea2906c | |
| parent | 4f97b61c425b620ffca190f130625c84c5754475 (diff) | |
| download | pyramid-57835f2edb1592bd3cc0d006de401ace5fc3552c.tar.gz pyramid-57835f2edb1592bd3cc0d006de401ace5fc3552c.tar.bz2 pyramid-57835f2edb1592bd3cc0d006de401ace5fc3552c.zip | |
add a test for an asset spec with a module dir
| -rw-r--r-- | pyramid/tests/test_mako_templating.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/pyramid/tests/test_mako_templating.py b/pyramid/tests/test_mako_templating.py index 550c95312..fbb04273b 100644 --- a/pyramid/tests/test_mako_templating.py +++ b/pyramid/tests/test_mako_templating.py @@ -1,7 +1,11 @@ ## come on python gimme some of that sweet, sweet -*- coding: utf-8 -*- +import shutil +import tempfile import unittest + from pyramid import testing + from pyramid.compat import ( text_, text_type, @@ -466,6 +470,15 @@ class TestPkgResourceTemplateLookup(unittest.TestCase): result = inst.get_template('pyramid.tests:fixtures/helloworld.mak') self.assertFalse(result is None) + def test_get_template_asset_spec_with_module_dir(self): + tmpdir = tempfile.mkdtemp() + try: + inst = self._makeOne(module_directory=tmpdir) + result = inst.get_template('pyramid.tests:fixtures/helloworld.mak') + self.assertFalse(result is None) + finally: + shutil.rmtree(tmpdir, ignore_errors=True) + def test_get_template_asset_spec_missing(self): from mako.exceptions import TopLevelLookupException fixturedir = self.get_fixturedir() |
