Skip to content

Commit

Permalink
test_import: change error to fehler to avoid triggering test failure …
Browse files Browse the repository at this point in the history
…because we get a warning from gosam
  • Loading branch information
andresailer committed Oct 17, 2024
1 parent 3e720be commit 42b1461
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions DDTest/python/test_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@

parametrize = pytest.mark.parametrize

ImportFehler = ImportError
FEHLER = "ERROR: "

moduleNames = [
'dd4hep',
'DDRec',
Expand Down Expand Up @@ -39,7 +42,7 @@ def test_module(moduleName):

# Test whether it is correctly imported from DD4hep

except ImportError as e:
except ImportFehler as e:
msg = "could not import %s: %s" % (moduleName, repr(e))
print(traceback.print_exc())

Expand All @@ -50,4 +53,4 @@ def test_module(moduleName):
warnings.warn(msg + "(Possibly due to system graphic libraries not present)", stacklevel=2)
pytest.skip("WARN: " + msg + "(Possibly due to system graphic libraries not present)")
else:
pytest.fail("ERROR: " + msg)
pytest.fail(FEHLER + msg)

0 comments on commit 42b1461

Please sign in to comment.