diff options
| author | Tim Graham <timograham@gmail.com> | 2015-02-03 08:15:24 -0500 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-02-03 08:21:06 -0500 |
| commit | c65c8f5696eeac056260a0850525d5266dcf8353 (patch) | |
| tree | 4880f181ce41cb2186e12d3c5ae9429900548334 | |
| parent | f87457a4604efc862381020b47f4e6fe8272ac0b (diff) | |
[1.8.x] Skipped tests from refs #24168 on Python 3.2.
| -rw-r--r-- | django/test/utils.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/django/test/utils.py b/django/test/utils.py index 90397f9298..6b5b06cd7c 100644 --- a/django/test/utils.py +++ b/django/test/utils.py @@ -22,9 +22,13 @@ from django.utils.deprecation import RemovedInDjango19Warning from django.utils.encoding import force_str from django.utils.translation import deactivate -try: - import jinja2 -except ImportError: +# Jinja2 doesn't run on Python 3.2 because it uses u-prefixed unicode strings. +if sys.version_info[:2] != (3, 2): + try: + import jinja2 + except ImportError: + jinja2 = None +else: jinja2 = None |
