mirror of
https://github.com/django/django.git
synced 2025-08-03 10:34:04 +00:00
Used skipIf decorator to skip image tests when PIL is not available
This commit is contained in:
parent
8fdc56d2a6
commit
86eb606b88
2 changed files with 379 additions and 369 deletions
|
@ -13,12 +13,10 @@ from django.utils import unittest
|
|||
from .models import (Foo, Bar, Whiz, BigD, BigS, Image, BigInt, Post,
|
||||
NullBooleanModel, BooleanModel, Document, RenamedField)
|
||||
|
||||
# If PIL available, do these tests.
|
||||
if Image:
|
||||
from .imagefield import (ImageFieldTests, ImageFieldTwoDimensionsTests,
|
||||
TwoImageFieldTests, ImageFieldNoDimensionsTests,
|
||||
ImageFieldOneDimensionTests, ImageFieldDimensionsFirstTests,
|
||||
ImageFieldUsingFileTests)
|
||||
from .imagefield import (ImageFieldTests, ImageFieldTwoDimensionsTests,
|
||||
TwoImageFieldTests, ImageFieldNoDimensionsTests,
|
||||
ImageFieldOneDimensionTests, ImageFieldDimensionsFirstTests,
|
||||
ImageFieldUsingFileTests)
|
||||
|
||||
|
||||
class BasicFieldTests(test.TestCase):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue