Skip to content

Commit 0a42ddf

Browse files
committed
tests
1 parent 114abe9 commit 0a42ddf

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

tests/unit/test_client.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -683,22 +683,17 @@ def test_cursor_close_handles_exception(self):
683683
mock_connection = Mock()
684684
mock_op_handle = Mock()
685685

686-
# Setup backend to raise an exception when close_command is called
687686
mock_backend.close_command.side_effect = Exception("Test error")
688687

689688
cursor = client.Cursor(mock_connection, mock_backend)
690689
cursor.active_op_handle = mock_op_handle
691690

692-
# This should not raise an exception
693691
cursor.close()
694692

695-
# Verify close_command was attempted
696693
mock_backend.close_command.assert_called_once_with(mock_op_handle)
697694

698-
# Verify active_op_handle was cleared despite the exception
699695
self.assertIsNone(cursor.active_op_handle)
700696

701-
# Verify open status is set to False
702697
self.assertFalse(cursor.open)
703698

704699
def test_cursor_context_manager_handles_exit_exception(self):

0 commit comments

Comments
 (0)