Skip to content

Commit 99ee979

Browse files
fix: remove accidentally removed assertions
1 parent ed04584 commit 99ee979

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/unit/test_client.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,16 @@ def test_context_manager_closes_cursor(self):
204204
cursor.close = mock_close
205205
mock_close.assert_called_once_with()
206206

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+
207217
def dict_product(self, dicts):
208218
"""
209219
Generate cartesion product of values in input dictionary, outputting a dictionary

0 commit comments

Comments
 (0)