Skip to content

Commit

Permalink
catch exception
Browse files Browse the repository at this point in the history
  • Loading branch information
lobis committed Nov 30, 2023
1 parent f2d3af9 commit 612f7dd
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions tests/test_application.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,15 @@ def test_missing_manager():

def test_multiple_apps():
# Could this work somehow?
for _ in range(2):
app = geant4.Application()
app.setup_manager()
app.setup_detector()
app.setup_physics()
app.setup_action()
app.initialize()
app.run()
with pytest.raises(Exception):
for _ in range(2):
app = geant4.Application()
app.setup_manager()
app.setup_detector()
app.setup_physics()
app.setup_action()
app.initialize()
app.run()


# This may not hold for all Geant4 versions
Expand Down

0 comments on commit 612f7dd

Please sign in to comment.