Chris McDonough
2012-03-27 57835f2edb1592bd3cc0d006de401ace5fc3552c
add a test for an asset spec with a module dir
1 files modified
13 ■■■■■ changed files
pyramid/tests/test_mako_templating.py 13 ●●●●● patch | view | raw | blame | history
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 @@
        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()