@@ -90,7 +90,7 @@ def test_fetchone_w_row(self):
9090 cursor = connection .cursor ()
9191 cursor .execute ('SELECT 1;' )
9292 row = cursor .fetchone ()
93- self .assertEquals (row , (1 ,))
93+ self .assertEqual (row , (1 ,))
9494 self .assertIsNone (cursor .fetchone ())
9595
9696 def test_fetchmany_wo_execute_raises_error (self ):
@@ -106,8 +106,8 @@ def test_fetchmany_w_row(self):
106106 cursor = connection .cursor ()
107107 cursor .execute ('SELECT 1;' )
108108 rows = cursor .fetchmany ()
109- self .assertEquals (len (rows ), 1 )
110- self .assertEquals (rows [0 ], (1 ,))
109+ self .assertEqual (len (rows ), 1 )
110+ self .assertEqual (rows [0 ], (1 ,))
111111
112112 def test_fetchmany_w_size (self ):
113113 from google .cloud .bigquery import dbapi
@@ -121,14 +121,14 @@ def test_fetchmany_w_size(self):
121121 cursor = connection .cursor ()
122122 cursor .execute ('SELECT a, b, c;' )
123123 rows = cursor .fetchmany (size = 2 )
124- self .assertEquals (len (rows ), 2 )
125- self .assertEquals (rows [0 ], (1 , 2 , 3 ))
126- self .assertEquals (rows [1 ], (4 , 5 , 6 ))
124+ self .assertEqual (len (rows ), 2 )
125+ self .assertEqual (rows [0 ], (1 , 2 , 3 ))
126+ self .assertEqual (rows [1 ], (4 , 5 , 6 ))
127127 second_page = cursor .fetchmany (size = 2 )
128- self .assertEquals (len (second_page ), 1 )
129- self .assertEquals (second_page [0 ], (7 , 8 , 9 ))
128+ self .assertEqual (len (second_page ), 1 )
129+ self .assertEqual (second_page [0 ], (7 , 8 , 9 ))
130130 third_page = cursor .fetchmany (size = 2 )
131- self .assertEquals (third_page , [])
131+ self .assertEqual (third_page , [])
132132
133133 def test_fetchmany_w_arraysize (self ):
134134 from google .cloud .bigquery import dbapi
@@ -143,14 +143,14 @@ def test_fetchmany_w_arraysize(self):
143143 cursor .arraysize = 2
144144 cursor .execute ('SELECT a, b, c;' )
145145 rows = cursor .fetchmany ()
146- self .assertEquals (len (rows ), 2 )
147- self .assertEquals (rows [0 ], (1 , 2 , 3 ))
148- self .assertEquals (rows [1 ], (4 , 5 , 6 ))
146+ self .assertEqual (len (rows ), 2 )
147+ self .assertEqual (rows [0 ], (1 , 2 , 3 ))
148+ self .assertEqual (rows [1 ], (4 , 5 , 6 ))
149149 second_page = cursor .fetchmany ()
150- self .assertEquals (len (second_page ), 1 )
151- self .assertEquals (second_page [0 ], (7 , 8 , 9 ))
150+ self .assertEqual (len (second_page ), 1 )
151+ self .assertEqual (second_page [0 ], (7 , 8 , 9 ))
152152 third_page = cursor .fetchmany ()
153- self .assertEquals (third_page , [])
153+ self .assertEqual (third_page , [])
154154
155155 def test_fetchall_wo_execute_raises_error (self ):
156156 from google .cloud .bigquery import dbapi
@@ -165,10 +165,10 @@ def test_fetchall_w_row(self):
165165 cursor = connection .cursor ()
166166 cursor .execute ('SELECT 1;' )
167167 self .assertIsNone (cursor .description )
168- self .assertEquals (cursor .rowcount , 1 )
168+ self .assertEqual (cursor .rowcount , 1 )
169169 rows = cursor .fetchall ()
170- self .assertEquals (len (rows ), 1 )
171- self .assertEquals (rows [0 ], (1 ,))
170+ self .assertEqual (len (rows ), 1 )
171+ self .assertEqual (rows [0 ], (1 ,))
172172
173173 def test_execute_w_dml (self ):
174174 from google .cloud .bigquery .dbapi import connect
@@ -177,7 +177,7 @@ def test_execute_w_dml(self):
177177 cursor = connection .cursor ()
178178 cursor .execute ('DELETE FROM UserSessions WHERE user_id = \' test\' ;' )
179179 self .assertIsNone (cursor .description )
180- self .assertEquals (cursor .rowcount , 12 )
180+ self .assertEqual (cursor .rowcount , 12 )
181181
182182 def test_execute_w_query (self ):
183183 from google .cloud .bigquery .schema import SchemaField
@@ -193,29 +193,29 @@ def test_execute_w_query(self):
193193 cursor .execute ('SELECT a, b, c FROM hello_world WHERE d > 3;' )
194194
195195 # Verify the description.
196- self .assertEquals (len (cursor .description ), 3 )
196+ self .assertEqual (len (cursor .description ), 3 )
197197 a_name , a_type , _ , _ , _ , _ , a_null_ok = cursor .description [0 ]
198- self .assertEquals (a_name , 'a' )
199- self .assertEquals (a_type , 'STRING' )
200- self .assertEquals (a_type , dbapi .STRING )
198+ self .assertEqual (a_name , 'a' )
199+ self .assertEqual (a_type , 'STRING' )
200+ self .assertEqual (a_type , dbapi .STRING )
201201 self .assertTrue (a_null_ok )
202202 b_name , b_type , _ , _ , _ , _ , b_null_ok = cursor .description [1 ]
203- self .assertEquals (b_name , 'b' )
204- self .assertEquals (b_type , 'STRING' )
205- self .assertEquals (b_type , dbapi .STRING )
203+ self .assertEqual (b_name , 'b' )
204+ self .assertEqual (b_type , 'STRING' )
205+ self .assertEqual (b_type , dbapi .STRING )
206206 self .assertFalse (b_null_ok )
207207 c_name , c_type , _ , _ , _ , _ , c_null_ok = cursor .description [2 ]
208- self .assertEquals (c_name , 'c' )
209- self .assertEquals (c_type , 'INTEGER' )
210- self .assertEquals (c_type , dbapi .NUMBER )
208+ self .assertEqual (c_name , 'c' )
209+ self .assertEqual (c_type , 'INTEGER' )
210+ self .assertEqual (c_type , dbapi .NUMBER )
211211 self .assertTrue (c_null_ok )
212212
213213 # Verify the results.
214- self .assertEquals (cursor .rowcount , 2 )
214+ self .assertEqual (cursor .rowcount , 2 )
215215 row = cursor .fetchone ()
216- self .assertEquals (row , ('hello' , 'world' , 1 ))
216+ self .assertEqual (row , ('hello' , 'world' , 1 ))
217217 row = cursor .fetchone ()
218- self .assertEquals (row , ('howdy' , 'y\' all' , 2 ))
218+ self .assertEqual (row , ('howdy' , 'y\' all' , 2 ))
219219 row = cursor .fetchone ()
220220 self .assertIsNone (row )
221221
@@ -228,7 +228,7 @@ def test_executemany_w_dml(self):
228228 'DELETE FROM UserSessions WHERE user_id = %s;' ,
229229 (('test' ,), ('anothertest' ,)))
230230 self .assertIsNone (cursor .description )
231- self .assertEquals (cursor .rowcount , 12 )
231+ self .assertEqual (cursor .rowcount , 12 )
232232
233233 def test__format_operation_w_dict (self ):
234234 from google .cloud .bigquery .dbapi import cursor
@@ -238,7 +238,7 @@ def test__format_operation_w_dict(self):
238238 'somevalue' : 'hi' ,
239239 'a `weird` one' : 'world' ,
240240 })
241- self .assertEquals (
241+ self .assertEqual (
242242 formatted_operation , 'SELECT @`somevalue`, @`a \\ `weird\\ ` one`;' )
243243
244244 def test__format_operation_w_wrong_dict (self ):
@@ -257,7 +257,7 @@ def test__format_operation_w_sequence(self):
257257 from google .cloud .bigquery .dbapi import cursor
258258 formatted_operation = cursor ._format_operation (
259259 'SELECT %s, %s;' , ('hello' , 'world' ))
260- self .assertEquals (formatted_operation , 'SELECT ?, ?;' )
260+ self .assertEqual (formatted_operation , 'SELECT ?, ?;' )
261261
262262 def test__format_operation_w_too_short_sequence (self ):
263263 from google .cloud .bigquery import dbapi
0 commit comments