Skip to content

Commit 160ba9f

Browse files
fix: remove accidentally removed assertions
Signed-off-by: varun-edachali-dbx <varun.edachali@databricks.com>
1 parent 71ba9d5 commit 160ba9f

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
@@ -208,6 +208,16 @@ def test_context_manager_closes_cursor(self):
208208
cursor.close = mock_close
209209
mock_close.assert_called_once_with()
210210

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

0 commit comments

Comments
 (0)