Skip to content

Commit 394333c

Browse files
fix: remove accidentally removed assertions
Signed-off-by: varun-edachali-dbx <varun.edachali@databricks.com>
1 parent fe642da commit 394333c

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
@@ -215,6 +215,16 @@ def test_context_manager_closes_cursor(self):
215215
cursor.close = mock_close
216216
mock_close.assert_called_once_with()
217217

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

0 commit comments

Comments
 (0)