Skip to content

Commit 1ef46cf

Browse files
formatting (black)
Signed-off-by: varun-edachali-dbx <varun.edachali@databricks.com>
1 parent ef07acd commit 1ef46cf

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

tests/unit/test_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,11 +216,11 @@ def test_context_manager_closes_cursor(self):
216216
mock_close.assert_called_once_with()
217217

218218
cursor = client.Cursor(Mock(), Mock())
219-
cursor.close = Mock()
219+
cursor.close = Mock()
220220

221221
try:
222222
with self.assertRaises(KeyboardInterrupt):
223-
with cursor:
223+
with cursor:
224224
raise KeyboardInterrupt("Simulated interrupt")
225225
finally:
226226
cursor.close.assert_called()

tests/unit/test_session.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -146,11 +146,11 @@ def test_socket_timeout_passthrough(self, mock_client_class):
146146
@patch("%s.session.ThriftDatabricksClient" % PACKAGE_NAME)
147147
def test_configuration_passthrough(self, mock_client_class):
148148
mock_session_config = Mock()
149-
149+
150150
# Create a mock SessionId that will be returned by open_session
151151
mock_session_id = SessionId(BackendType.THRIFT, b"\x22", b"\x33")
152152
mock_client_class.return_value.open_session.return_value = mock_session_id
153-
153+
154154
databricks.sql.connect(
155155
session_configuration=mock_session_config, **self.DUMMY_CONNECTION_ARGS
156156
)
@@ -171,11 +171,11 @@ def test_initial_namespace_passthrough(self, mock_client_class):
171171
databricks.sql.connect(
172172
**self.DUMMY_CONNECTION_ARGS, catalog=mock_cat, schema=mock_schem
173173
)
174-
174+
175175
# Check that open_session was called with the correct catalog and schema as positional arguments
176176
call_args = mock_client_class.return_value.open_session.call_args[0]
177-
self.assertEqual(call_args[1], mock_cat) # catalog is second positional argument
178-
self.assertEqual(call_args[2], mock_schem) # schema is third positional argument
177+
self.assertEqual(call_args[1], mock_cat)
178+
self.assertEqual(call_args[2], mock_schem)
179179

180180
@patch("%s.session.ThriftDatabricksClient" % PACKAGE_NAME)
181181
def test_finalizer_closes_abandoned_connection(self, mock_client_class):

0 commit comments

Comments
 (0)