Also added basic check of exceptinHandler
This commit is contained in:
+6
-1
@@ -8,7 +8,7 @@ import pytest
|
||||
|
||||
from PyQt5.QtWidgets import qApp
|
||||
|
||||
from nw.error import NWErrorMessage
|
||||
from nw.error import NWErrorMessage, exceptionHandler
|
||||
|
||||
@pytest.mark.error
|
||||
def testErrorDialog(qtbot, nwFuncTemp, nwTemp):
|
||||
@@ -35,6 +35,11 @@ def testErrorDialog(qtbot, nwFuncTemp, nwTemp):
|
||||
nwErr._doClose()
|
||||
nwErr.close()
|
||||
|
||||
theMessage = exceptionHandler(Exception, "Second Error", sys.last_traceback, testMode=True)
|
||||
assert theMessage
|
||||
assert "Second Error" in theMessage
|
||||
assert "Exception" in theMessage
|
||||
|
||||
nwGUI.closeMain()
|
||||
|
||||
# qtbot.stopForInteraction()
|
||||
|
||||
Reference in New Issue
Block a user