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 ed04584 commit 99ee979Copy full SHA for 99ee979
tests/unit/test_client.py
@@ -204,6 +204,16 @@ def test_context_manager_closes_cursor(self):
204
cursor.close = mock_close
205
mock_close.assert_called_once_with()
206
207
+ cursor = client.Cursor(Mock(), Mock())
208
+ cursor.close = Mock()
209
+
210
+ try:
211
+ with self.assertRaises(KeyboardInterrupt):
212
+ with cursor:
213
+ raise KeyboardInterrupt("Simulated interrupt")
214
+ finally:
215
+ cursor.close.assert_called()
216
217
def dict_product(self, dicts):
218
"""
219
Generate cartesion product of values in input dictionary, outputting a dictionary
0 commit comments