diff --git a/tests/test_main.py b/tests/test_main.py index 39af97f..66ffa21 100644 --- a/tests/test_main.py +++ b/tests/test_main.py @@ -27,12 +27,13 @@ def test_debug_exception_handler(): from unittest.mock import patch, MagicMock mock_tb = MagicMock() + exc_val = ValueError("test error") with patch("traceback.print_exception") as mock_print, \ patch("pdb.post_mortem") as mock_pm: - debug_exception_handler(ValueError, ValueError("test error"), mock_tb) + debug_exception_handler(ValueError, exc_val, mock_tb) - mock_print.assert_called_once_with(ValueError, ValueError("test error"), mock_tb) + mock_print.assert_called_once_with(ValueError, exc_val, mock_tb) mock_pm.assert_called_once_with(mock_tb) # }}}