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 fe642da commit 394333cCopy full SHA for 394333c
tests/unit/test_client.py
@@ -215,6 +215,16 @@ def test_context_manager_closes_cursor(self):
215
cursor.close = mock_close
216
mock_close.assert_called_once_with()
217
218
+ cursor = client.Cursor(Mock(), Mock())
219
+ cursor.close = Mock()
220
+
221
+ try:
222
+ with self.assertRaises(KeyboardInterrupt):
223
+ with cursor:
224
+ raise KeyboardInterrupt("Simulated interrupt")
225
+ finally:
226
+ cursor.close.assert_called()
227
228
def dict_product(self, dicts):
229
"""
230
Generate cartesion product of values in input dictionary, outputting a dictionary
0 commit comments