Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
D
django
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
django
Commits
a9215b7c
Kaydet (Commit)
a9215b7c
authored
Tem 02, 2016
tarafından
Baptiste Mispelon
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Refs #21548 -- Skipped tests that rely on pillow when it's not installed
üst
ed1c15d8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
tests.py
tests/validators/tests.py
+11
-1
No files found.
tests/validators/tests.py
Dosyayı görüntüle @
a9215b7c
...
...
@@ -6,7 +6,7 @@ import os
import
re
import
types
from
datetime
import
datetime
,
timedelta
from
unittest
import
TestCase
from
unittest
import
TestCase
,
skipUnless
from
django.core.exceptions
import
ValidationError
from
django.core.files.base
import
ContentFile
...
...
@@ -23,6 +23,13 @@ from django.test import SimpleTestCase
from
django.test.utils
import
str_prefix
from
django.utils._os
import
upath
try
:
from
PIL
import
Image
# noqa
except
ImportError
:
PILLOW_IS_INSTALLED
=
False
else
:
PILLOW_IS_INSTALLED
=
True
NOW
=
datetime
.
now
()
EXTENDED_SCHEMES
=
[
'http'
,
'https'
,
'ftp'
,
'ftps'
,
'git'
,
'file'
,
'git+ssh'
]
...
...
@@ -299,6 +306,9 @@ def create_simple_test_method(validator, expected, value, num):
else
:
val_name
=
validator
.
__class__
.
__name__
test_name
=
test_mask
%
(
val_name
,
num
)
if
validator
is
validate_image_file_extension
:
SKIP_MSG
=
"Pillow is required to test validate_image_file_extension"
test_func
=
skipUnless
(
PILLOW_IS_INSTALLED
,
SKIP_MSG
)(
test_func
)
return
test_name
,
test_func
# Dynamically assemble a test class with the contents of TEST_DATA
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment