From 1762981de894ed3362aef6e29c0ae254bfcbd49c Mon Sep 17 00:00:00 2001 From: Mirko Galimberti Date: Sat, 10 Sep 2022 09:07:25 +0200 Subject: [PATCH] toml may not be available on systemwide python (#2670) (cherry picked from commit ed43cbb5554d44b99f90facecf9ef793ddf1fd59) --- 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