Skip avatar test if PIL is not installed

This commit is contained in:
Cédric Krier committed 2021-05-05 18:09:08 +02:00
1 parent 0184868f9c
commit 6876233292
1 file changed
+6
+6
View File
@@ -2,6 +2,11 @@
# this repository contains the full copyright notices and license terms.
import unittest
try:
import PIL
except ImportError:
PIL = None
from trytond.pool import Pool
from .test_tryton import ModuleTestCase, with_transaction
@@ -11,6 +16,7 @@ class ResTestCase(ModuleTestCase):
'Test res module'
module = 'res'
@unittest.skipUnless(PIL, "Avatars are not generated without PIL")
@with_transaction()
def test_user_avatar(self):
pool = Pool()