From 687623329220ad2d2f8792977ca9e1ff246211bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 5 May 2021 18:09:08 +0200 Subject: [PATCH] Skip avatar test if PIL is not installed --- trytond/tests/test_res.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/trytond/tests/test_res.py b/trytond/tests/test_res.py index 6c6786385e..245ada09f7 100644 --- a/trytond/tests/test_res.py +++ b/trytond/tests/test_res.py @@ -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()