From bfa980ef38ec934a9cd5cc8bd1c384ed352d6999 Mon Sep 17 00:00:00 2001 From: Mirko Galimberti Date: Thu, 8 Sep 2022 21:57:33 +0200 Subject: [PATCH] toml may not be available on systemwide python --- tests/test_pythonpackage_basic.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/test_pythonpackage_basic.py b/tests/test_pythonpackage_basic.py index 87f7759df7..63c4003f72 100644 --- a/tests/test_pythonpackage_basic.py +++ b/tests/test_pythonpackage_basic.py @@ -269,11 +269,15 @@ def test_systemwide_python(self): p2 = os.path.normpath(pybin) assert p1 == p2 except RuntimeError as e: + # (remember this is not in a virtualenv) + # Some deps may not be installed, so we just avoid to raise + # an exception here, as a missing dep should not make the test + # fail. if "pep517" in str(e.args): # System python probably doesn't have pep517 available! - # (remember this is not in a virtualenv) - # Not much we can do in that case since pythonpackage needs it, - # so we'll skip this particular check. + pass + elif "toml" in str(e.args): + # System python probably doesn't have toml available! pass else: raise