We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 04130ed commit 13fa77eCopy full SHA for 13fa77e
tests/unit/test_client.py
@@ -208,6 +208,16 @@ def test_context_manager_closes_cursor(self):
208
cursor.close = mock_close
209
mock_close.assert_called_once_with()
210
211
+ cursor = client.Cursor(Mock(), Mock())
212
+ cursor.close = Mock()
213
+
214
+ try:
215
+ with self.assertRaises(KeyboardInterrupt):
216
+ with cursor:
217
+ raise KeyboardInterrupt("Simulated interrupt")
218
+ finally:
219
+ cursor.close.assert_called()
220
221
def dict_product(self, dicts):
222
"""
223
Generate cartesion product of values in input dictionary, outputting a dictionary
0 commit comments