@@ -47,14 +47,14 @@ def test_cython_parser(self):
47
47
"""
48
48
Test Cython-based parser that returns a list of tuples
49
49
"""
50
- verify_iterator_data (self . assertEqual , get_data (ProtocolHandler ))
50
+ verify_iterator_data (get_data (ProtocolHandler ))
51
51
52
52
@cythontest
53
53
def test_cython_lazy_parser (self ):
54
54
"""
55
55
Test Cython-based parser that returns an iterator of tuples
56
56
"""
57
- verify_iterator_data (self . assertEqual , get_data (LazyProtocolHandler ))
57
+ verify_iterator_data (get_data (LazyProtocolHandler ))
58
58
59
59
@numpytest
60
60
def test_cython_lazy_results_paged (self ):
@@ -74,7 +74,7 @@ def test_cython_lazy_results_paged(self):
74
74
results = session .execute ("SELECT * FROM test_table" )
75
75
76
76
assert results .has_more_pages
77
- assert verify_iterator_data (self . assertEqual , results ) == self .N_ITEMS # make sure we see all rows
77
+ assert verify_iterator_data (results ) == self .N_ITEMS # make sure we see all rows
78
78
79
79
cluster .shutdown ()
80
80
@@ -146,7 +146,7 @@ def _verify_numpy_page(self, page):
146
146
arr = page [colname ]
147
147
self .match_dtype (datatype , arr .dtype )
148
148
149
- return verify_iterator_data (self . assertEqual , arrays_to_list_of_tuples (page , colnames ))
149
+ return verify_iterator_data (arrays_to_list_of_tuples (page , colnames ))
150
150
151
151
def match_dtype (self , datatype , dtype ):
152
152
"""Match a string cqltype (e.g. 'int' or 'blob') with a numpy dtype"""
@@ -192,18 +192,17 @@ def get_data(protocol_handler):
192
192
return results
193
193
194
194
195
- def verify_iterator_data (assertEqual , results ):
195
+ def verify_iterator_data (results ):
196
196
"""
197
197
Check the result of get_data() when this is a list or
198
198
iterator of tuples
199
199
"""
200
200
count = 0
201
201
for count , result in enumerate (results , 1 ):
202
202
params = get_all_primitive_params (result [0 ])
203
- assertEqual (len (params ), len (result ),
204
- msg = "Not the right number of columns?" )
203
+ assert len (params ) == len (result ), "Not the right number of columns?"
205
204
for expected , actual in zip (params , result ):
206
- assertEqual ( actual , expected )
205
+ assert actual == expected
207
206
return count
208
207
209
208
0 commit comments