Skip to content

Commit

Permalink
tests get current app instance if there already is one
Browse files Browse the repository at this point in the history
  • Loading branch information
rgerum committed Jan 21, 2025
1 parent af27818 commit f55b9ef
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/test_use_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ def do_raise(_, name, desc):
# Set the exception hook to our wrapping function
sys.excepthook = lambda *args: sys._excepthook(*args)

app = QtWidgets.QApplication(sys.argv)
if not QtWidgets.QApplication.instance():
app = QtWidgets.QApplication(sys.argv)
else:
app = QtWidgets.QApplication.instance()
font = QtGui.QFont("Arial", 10)
app.setFont(font)

Expand Down

0 comments on commit f55b9ef

Please sign in to comment.