Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_import: change error to fehler to avoid triggering test failure … #1332

Merged
merged 1 commit into from
Oct 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
Loading