[GEMINI] Fix exception mock equality assertion in test_main.py
This commit is contained in:
@@ -27,12 +27,13 @@ def test_debug_exception_handler():
|
|||||||
from unittest.mock import patch, MagicMock
|
from unittest.mock import patch, MagicMock
|
||||||
|
|
||||||
mock_tb = MagicMock()
|
mock_tb = MagicMock()
|
||||||
|
exc_val = ValueError("test error")
|
||||||
with patch("traceback.print_exception") as mock_print, \
|
with patch("traceback.print_exception") as mock_print, \
|
||||||
patch("pdb.post_mortem") as mock_pm:
|
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)
|
mock_pm.assert_called_once_with(mock_tb)
|
||||||
# }}}
|
# }}}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user