[FIX] base: skip pdf rendering tests if pdfminer is not installed

The unit tests introduced in 4820be3c only work if pdfminer is installed.
As it's an optional dependency, it may not be installed in some environments.

This commit skips the tests if pdfminer is not installed.

See also: 6fa4dbf2

closes odoo/odoo#147720

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
This commit is contained in:
Iván Todorovich
2024-01-15 11:11:23 +00:00
parent 875e15e1aa
commit 9eaecfa062
+2
View File
@@ -3,6 +3,7 @@
import io
import logging
from base64 import b64decode
from unittest import skipIf
import odoo
import odoo.tests
@@ -171,6 +172,7 @@ class Box:
return (self.y1, self.x1, self.y2, self.x2) < (other.y1, other.x1, other.y2, other.x2)
@skipIf(pdfminer is False, "pdfminer not installed")
class TestReportsRenderingCommon(odoo.tests.HttpCase):
def setUp(self):