From 149fc1a9c5e4b6b4d501463a4f20937f96a042fd Mon Sep 17 00:00:00 2001 From: "Veronica K. B. Olsen" <1619840+vkbo@users.noreply.github.com> Date: Sat, 19 Sep 2020 17:47:36 +0200 Subject: [PATCH] Pass None as traceback object for error handling test --- tests/test_error.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/test_error.py b/tests/test_error.py index 25920917..179efa68 100644 --- a/tests/test_error.py +++ b/tests/test_error.py @@ -3,7 +3,6 @@ """ import nw -import sys import pytest from PyQt5.QtWidgets import qApp @@ -27,7 +26,7 @@ def testErrorDialog(qtbot, nwFuncTemp, nwTemp): assert nwErr.msgBody.toPlainText() == "Failed to generate error report ..." # Valid Error - nwErr.setMessage(Exception, "First Error", sys.last_traceback) + nwErr.setMessage(Exception, "First Error", None) theMessage = nwErr.msgBody.toPlainText() assert theMessage assert "First Error" in theMessage @@ -35,7 +34,7 @@ def testErrorDialog(qtbot, nwFuncTemp, nwTemp): nwErr._doClose() nwErr.close() - theMessage = exceptionHandler(Exception, "Second Error", sys.last_traceback, testMode=True) + theMessage = exceptionHandler(Exception, "Second Error", None, testMode=True) assert theMessage assert "Second Error" in theMessage assert "Exception" in theMessage