Commits

Jason Pellerin  committed ba6e061

Fixed nosetests config, updated tests

  • Participants
  • Parent commits 2c00822

Comments (0)

Files changed (4)

File jinja2/tests.py

     :copyright: (c) 2009 by the Jinja Team.
     :license: BSD, see LICENSE for more details.
 """
+__test__ = False # tell nose this is not a test module
+
 import re
 from jinja2.runtime import Undefined
 
-
 number_re = re.compile(r'^-?\d+(\.\d+)?$')
 regex_type = type(number_re)
 
 [nosetests]
 #verbosity=2
 detailed-errors=1
-cover-package=nose
-where=tests

File tests/test_forloop.py

     assert t.render(foo=(1,)) == '...1......2...'
 
 
-def test_scoping_context_func(env):
+def test_scoping_context_func():
     t = env.from_string('''
     {%- for item in foo %}{% set x = item %}{{ callme() }}{% endfor -%}
     ''')
     assert t.render(foo=(1,), callme=callme) == '1'
 
 
-def test_scoping_context_filter(env):
+def test_scoping_context_filter():
     @contextfilter
     def xtimes(context, arg):
         assert 'item' in context

File tests/test_loaders.py

     :license: BSD, see LICENSE for more details.
 """
 
+import os
 import time
 import tempfile
 from jinja2 import Environment, loaders
 
 from nose.tools import assert_raises
 
+HERE = os.path.dirname(__file__)
 
 dict_loader = loaders.DictLoader({
     'justdict.html':        'FOO'
 })
 package_loader = loaders.PackageLoader('loaderres', 'templates')
-filesystem_loader = loaders.FileSystemLoader('loaderres/templates')
+filesystem_loader = loaders.FileSystemLoader(
+    os.path.join(HERE, 'loaderres', 'templates'))
 function_loader = loaders.FunctionLoader({'justfunction.html': 'FOO'}.get)
 choice_loader = loaders.ChoiceLoader([dict_loader, package_loader])
 prefix_loader = loaders.PrefixLoader({