drop support for Jinja2 for Python 3.2
This commit is contained in:
@@ -25,6 +25,8 @@ else:
|
||||
except ImportError:
|
||||
from StringIO import StringIO
|
||||
|
||||
_TEST_JINJA2 = not(sys.version_info.major == 3 and sys.version_info.minor == 2)
|
||||
|
||||
|
||||
class OfflineTestCaseMixin(object):
|
||||
template_name = "test_compressor_offline.html"
|
||||
@@ -33,10 +35,10 @@ class OfflineTestCaseMixin(object):
|
||||
templates_dir = ""
|
||||
expected_hash = ""
|
||||
# Engines to test
|
||||
if sys.version_info.major == 3 and sys.version_info.minor == 2:
|
||||
engines = ("django",)
|
||||
else:
|
||||
if _TEST_JINJA2:
|
||||
engines = ("django", "jinja2")
|
||||
else:
|
||||
engines = ("django",)
|
||||
|
||||
def setUp(self):
|
||||
self._old_compress = settings.COMPRESS_ENABLED
|
||||
@@ -288,6 +290,7 @@ class OfflineGenerationTestCase(OfflineTestCaseMixin, TestCase):
|
||||
self.assertRaises(OfflineGenerationError,
|
||||
self.template.render, Context({}))
|
||||
|
||||
@unittest.skipUnless(_TEST_JINJA2, "No Jinja2 testing")
|
||||
def test_rendering_without_manifest_raises_exception_jinja2(self):
|
||||
# flush cached manifest
|
||||
flush_offline_manifest()
|
||||
|
14
tox.ini
14
tox.ini
@@ -20,16 +20,6 @@ three =
|
||||
BeautifulSoup4
|
||||
jingo
|
||||
coffin
|
||||
three_two =
|
||||
flake8
|
||||
coverage
|
||||
html5lib
|
||||
mock
|
||||
jinja2==2.6
|
||||
lxml
|
||||
BeautifulSoup4
|
||||
jingo
|
||||
coffin
|
||||
|
||||
[tox]
|
||||
envlist =
|
||||
@@ -64,7 +54,7 @@ deps =
|
||||
basepython = python3.2
|
||||
deps =
|
||||
Django>=1.6,<1.7
|
||||
{[deps]three_two}
|
||||
{[deps]three}
|
||||
|
||||
[testenv:py27-1.6.X]
|
||||
basepython = python2.7
|
||||
@@ -90,7 +80,7 @@ basepython = python3.2
|
||||
deps =
|
||||
Django>=1.5,<1.6
|
||||
django-discover-runner
|
||||
{[deps]three_two}
|
||||
{[deps]three}
|
||||
|
||||
[testenv:py27-1.5.X]
|
||||
basepython = python2.7
|
||||
|
Reference in New Issue
Block a user