2626
2727TABLE_ID = "new_test"
2828PANDAS_VERSION = pkg_resources .parse_version (pandas .__version__ )
29- NULLABLE_INT_PANDAS_VERSION = pkg_resources .parse_version ("0.24.0" )
30- NULLABLE_INT_MESSAGE = "Require pandas 0.24+ in order to use nullable integer type."
3129
3230
3331def test_imports ():
@@ -173,9 +171,6 @@ def test_should_properly_handle_valid_integers(self, project_id):
173171 tm .assert_frame_equal (df , DataFrame ({"valid_integer" : [3 ]}))
174172
175173 def test_should_properly_handle_nullable_integers (self , project_id ):
176- if PANDAS_VERSION < NULLABLE_INT_PANDAS_VERSION :
177- pytest .skip (msg = NULLABLE_INT_MESSAGE )
178-
179174 query = """SELECT * FROM
180175 UNNEST([1, NULL]) AS nullable_integer
181176 """
@@ -188,9 +183,7 @@ def test_should_properly_handle_nullable_integers(self, project_id):
188183 )
189184 tm .assert_frame_equal (
190185 df ,
191- DataFrame (
192- {"nullable_integer" : pandas .Series ([1 , pandas .NA ], dtype = "Int64" )}
193- ),
186+ DataFrame ({"nullable_integer" : pandas .Series ([1 , None ], dtype = "Int64" )}),
194187 )
195188
196189 def test_should_properly_handle_valid_longs (self , project_id ):
@@ -204,9 +197,6 @@ def test_should_properly_handle_valid_longs(self, project_id):
204197 tm .assert_frame_equal (df , DataFrame ({"valid_long" : [1 << 62 ]}))
205198
206199 def test_should_properly_handle_nullable_longs (self , project_id ):
207- if PANDAS_VERSION < NULLABLE_INT_PANDAS_VERSION :
208- pytest .skip (msg = NULLABLE_INT_MESSAGE )
209-
210200 query = """SELECT * FROM
211201 UNNEST([1 << 62, NULL]) AS nullable_long
212202 """
@@ -219,15 +209,10 @@ def test_should_properly_handle_nullable_longs(self, project_id):
219209 )
220210 tm .assert_frame_equal (
221211 df ,
222- DataFrame (
223- {"nullable_long" : pandas .Series ([1 << 62 , pandas .NA ], dtype = "Int64" )}
224- ),
212+ DataFrame ({"nullable_long" : pandas .Series ([1 << 62 , None ], dtype = "Int64" )}),
225213 )
226214
227215 def test_should_properly_handle_null_integers (self , project_id ):
228- if PANDAS_VERSION < NULLABLE_INT_PANDAS_VERSION :
229- pytest .skip (msg = NULLABLE_INT_MESSAGE )
230-
231216 query = "SELECT CAST(NULL AS INT64) AS null_integer"
232217 df = gbq .read_gbq (
233218 query ,
@@ -237,7 +222,7 @@ def test_should_properly_handle_null_integers(self, project_id):
237222 dtypes = {"null_integer" : "Int64" },
238223 )
239224 tm .assert_frame_equal (
240- df , DataFrame ({"null_integer" : pandas .Series ([pandas . NA ], dtype = "Int64" )}),
225+ df , DataFrame ({"null_integer" : pandas .Series ([None ], dtype = "Int64" )}),
241226 )
242227
243228 def test_should_properly_handle_valid_floats (self , project_id ):
0 commit comments