Skip to content

Commit 1cacdc7

Browse files
dkropachevclaude
andcommitted
Fix UnboundLocalError in test_numpy_results_paged
Initialize `count` variable before the for loop to prevent UnboundLocalError when the loop doesn't execute. This follows the same pattern already used in verify_iterator_data(). Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent e832273 commit 1cacdc7

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

tests/integration/standard/test_cython_protocol_handlers.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ def test_numpy_results_paged(self):
110110
results = session.execute("SELECT * FROM test_table")
111111

112112
assert results.has_more_pages
113+
count = 0
113114
for count, page in enumerate(results, 1):
114115
assert isinstance(page, dict)
115116
for colname, arr in page.items():

0 commit comments

Comments
 (0)