File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -233,8 +233,9 @@ def test_select_multi(self):
233233 SELECT my_col_a FROM my_table;
234234 SELECT my_col_a FROM my_table LIMIT 10;
235235 ''' ):
236- for row in rows :
237- raise Exception ('Just after iterating first row' )
236+ rows_it = iter (rows )
237+ next (rows_it )
238+ raise Exception ('Just after iterating first row' )
238239
239240 with self .assertRaisesRegex (Exception , 'Multiple open statements' ):
240241 with sqlite_s3_query_multi ('http://localhost:9000/my-bucket/my.db' , get_credentials = lambda now : (
@@ -248,12 +249,13 @@ def test_select_multi(self):
248249 SELECT my_col_a FROM my_table LIMIT 10;
249250 ''' ))
250251 columns_1 , rows_1 = next (it )
251- for row in rows_1 :
252- break
252+ rows_1_it = iter ( rows_1 )
253+ next ( rows_1_it )
253254
254255 columns_2 , rows_2 = next (it )
255- for row in rows_2 :
256- raise Exception ('Multiple open statements' )
256+ rows_2_it = iter (rows_2 )
257+ next (rows_2_it )
258+ raise Exception ('Multiple open statements' )
257259
258260 with self .assertRaisesRegex (Exception , 'Attempting to use finalized statement' ):
259261 with sqlite_s3_query_multi ('http://localhost:9000/my-bucket/my.db' , get_credentials = lambda now : (
You can’t perform that action at this time.
0 commit comments