Permalink
Browse files

Merge branch 'sontek-allow-hyphens'

  • Loading branch information...
mcdonc committed Sep 22, 2012
2 parents f272f27 + b9f54f3 commit 72561a213ccc456738582551e85fab0f0c8d09ab
Showing with 15 additions and 1 deletion.
  1. +1 −1 pyramid/mako_templating.py
  2. +14 −0 pyramid/tests/test_mako_templating.py
@@ -91,7 +91,7 @@ def __init__(self, settings_prefix=None):
def __call__(self, info):
p = re.compile(
r'(?P<asset>[\w_.:/]+)'
r'(?P<asset>[\w_.:/-]+)'
r'(?:\#(?P<defname>[\w_]+))?'
r'(\.(?P<ext>.*))'
)
@@ -31,6 +31,20 @@ def _getLookup(self, name='mako.'):
from pyramid.mako_templating import IMakoLookup
return self.config.registry.getUtility(IMakoLookup, name=name)
def test_hyphen_filenames(self):
from pyramid.mako_templating import renderer_factory
info = DummyRendererInfo({
'name':'app:moon-and-world.mak',
'package':None,
'registry':self.config.registry,
'settings':{},
'type': ''
})
result = renderer_factory(info)
self.assertEqual(result.path, 'app:moon-and-world.mak')
def test_no_directories(self):
info = DummyRendererInfo({
'name':'pyramid.tests:fixtures/helloworld.mak',

0 comments on commit 72561a2

Please sign in to comment.