Permalink
Browse files

Trying even harder to test #30.

  • Loading branch information...
ralphbean committed Jun 15, 2012
1 parent 7d1d838 commit b66b59ff512b70e0bb4237bf14c85898d0626bb1
Showing with 16 additions and 1 deletion.
  1. +16 −1 tests/test_template.py
@@ -3,6 +3,7 @@
import itertools
import os
import webob as wo
import contextlib
from nose.tools import raises, eq_
from strainer.operators import assert_eq_xhtml
@@ -21,6 +22,14 @@ def product(*args):
itertools.product = product
@contextlib.contextmanager
def directory(location):
old_location = os.getcwd()
os.chdir(location)
yield
os.chdir(old_location)
class TestWD(twc.Widget):
test = twc.Param(default='bob')
@@ -166,9 +175,15 @@ def test_genshi_abs(self):
twc.Widget(template='genshi_abs:%s' % fname).display()
def test_genshi_relative_filename(self):
""" Issue #30 -- http://bit.ly/LT4rBP """
""" Issue #30 take 1 -- http://bit.ly/LT4rBP """
twc.Widget(template='genshi:./tests/test.html').display()
def test_genshi_relative_filename_cwd(self):
""" Issue #30 take 2 -- http://bit.ly/LT4rBP """
with directory('./tests'):
twc.Widget(template='genshi:./test.html').display()
def test_rendering_extension_propagation(self):
mw = twc.make_middleware(None, preferred_rendering_engines=['genshi', 'jinja'],
rendering_extension_lookup={'genshi':['genshi', 'html'],

0 comments on commit b66b59f

Please sign in to comment.