From 74fdf49ade95157c3c4b23a95831925be4899223 Mon Sep 17 00:00:00 2001 From: Peter Cock Date: Mon, 5 Jun 2023 12:39:59 +0100 Subject: [PATCH] Skip if ReportLab bitmap output module missing Would like to skip this earlier, but not so easy in ReportLab v4 with a choice of backends --- Tests/test_GraphicsBitmaps.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Tests/test_GraphicsBitmaps.py b/Tests/test_GraphicsBitmaps.py index 2ffdfb3dd71..76615a2fd1d 100644 --- a/Tests/test_GraphicsBitmaps.py +++ b/Tests/test_GraphicsBitmaps.py @@ -111,9 +111,12 @@ def real_test(): "Check the fonts needed by ReportLab if you want " "bitmaps from Bio.Graphics\n" + str(err) ) from None + elif str(err).startswith("cannot import desired renderPM backend rlPyCairo"): + raise MissingExternalDependencyError( + "Reportlab module rlPyCairo unavailable\n" + str(err) + ) from None else: raise - return True