Skip to content

Commit 726abe7

Browse files
use pytest-like assertions for test_closing_connection_closes_commands
Signed-off-by: varun-edachali-dbx <varun.edachali@databricks.com>
1 parent 019c7fb commit 726abe7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/unit/test_client.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,12 +138,12 @@ def test_closing_connection_closes_commands(self, mock_thrift_client_class):
138138
# Close the connection
139139
connection.close()
140140

141-
# Verify the REAL close logic worked through the chain:
141+
# Verify the close logic worked:
142142
# 1. has_been_closed_server_side should always be True after close()
143-
self.assertTrue(real_result_set.has_been_closed_server_side)
143+
assert real_result_set.has_been_closed_server_side is True
144144

145145
# 2. op_state should always be CLOSED after close()
146-
self.assertEqual(real_result_set.op_state, CommandState.CLOSED)
146+
assert real_result_set.op_state == CommandState.CLOSED
147147

148148
# 3. Backend close_command should be called appropriately
149149
if not closed:

0 commit comments

Comments
 (0)