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 93eefe6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions DDTest/python/test_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

parametrize = pytest.mark.parametrize

ImportFehler = ImportError

moduleNames = [
'dd4hep',
'DDRec',
Expand Down Expand Up @@ -39,7 +41,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 +52,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 93eefe6

Please sign in to comment.