[Python-modules-commits] [sorl-thumbnail] 06/15: skip incompatible test for Django 1.8/1.9

Wolfgang Borgert debacle at moszumanska.debian.org
Wed Oct 5 01:39:42 UTC 2016


This is an automated email from the git hooks/post-receive script.

debacle pushed a commit to branch master
in repository sorl-thumbnail.

commit aaf55c02fafab0f366155d02163051dcf2d516c3
Author: W. Martin Borgert <debacle at debian.org>
Date:   Wed Jan 6 21:18:12 2016 +0100

    skip incompatible test for Django 1.8/1.9
---
 tests/thumbnail_tests/compat.py            | 5 +++++
 tests/thumbnail_tests/test_templatetags.py | 2 ++
 2 files changed, 7 insertions(+)

diff --git a/tests/thumbnail_tests/compat.py b/tests/thumbnail_tests/compat.py
index 7367017..10f26df 100644
--- a/tests/thumbnail_tests/compat.py
+++ b/tests/thumbnail_tests/compat.py
@@ -4,6 +4,11 @@ try:
     import unittest2 as unittest
 except ImportError:
     import unittest
+else:
+    try:
+        from django.utils import unittest
+    except ImportError:
+        import unittest
 
 
 def is_osx():
diff --git a/tests/thumbnail_tests/test_templatetags.py b/tests/thumbnail_tests/test_templatetags.py
index 0dbef1e..557c2d2 100644
--- a/tests/thumbnail_tests/test_templatetags.py
+++ b/tests/thumbnail_tests/test_templatetags.py
@@ -8,6 +8,7 @@ from PIL import Image
 
 from django.template.loader import render_to_string
 from django.test import Client, TestCase
+from django import VERSION
 import pytest
 
 from sorl.thumbnail.conf import settings
@@ -167,6 +168,7 @@ class TemplateTestCaseB(BaseTestCase):
 
 
 class TemplateTestCaseClient(TestCase):
+    @unittest.skipIf(VERSION[0] == 1 and VERSION[1] in [8, 9], "Test incompatible with Django 1.8/1.9")
     def test_empty_error(self):
         with override_custom_settings(settings, THUMBNAIL_DEBUG=False):
             from django.core.mail import outbox

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/sorl-thumbnail.git



More information about the Python-modules-commits mailing list