Skip to content

Commit 93b84a4

Browse files
committed
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().
1 parent 88d73c1 commit 93b84a4

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)