Skip to content

Commit 4e9002d

Browse files
tswastparthea
authored andcommitted
MAINT: pandas.util.testing.assert_equals removed
This method was removed in pandas-dev/pandas#16017 in favor of pytest.raises.
1 parent cbcfe16 commit 4e9002d

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

pandas_gbq/tests/test_gbq.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
import logging
1010

1111
import numpy as np
12-
import pytest
1312

1413
from distutils.version import StrictVersion
1514
from pandas import compat
@@ -387,23 +386,23 @@ def test_import_google_api_python_client(self):
387386

388387
def test_should_return_bigquery_integers_as_python_ints(self):
389388
result = gbq._parse_entry(1, 'INTEGER')
390-
tm.assert_equal(result, int(1))
389+
assert result == int(1)
391390

392391
def test_should_return_bigquery_floats_as_python_floats(self):
393392
result = gbq._parse_entry(1, 'FLOAT')
394-
tm.assert_equal(result, float(1))
393+
assert result == float(1)
395394

396395
def test_should_return_bigquery_timestamps_as_numpy_datetime(self):
397396
result = gbq._parse_entry('0e9', 'TIMESTAMP')
398-
tm.assert_equal(result, np_datetime64_compat('1970-01-01T00:00:00Z'))
397+
assert result == np_datetime64_compat('1970-01-01T00:00:00Z')
399398

400399
def test_should_return_bigquery_booleans_as_python_booleans(self):
401400
result = gbq._parse_entry('false', 'BOOLEAN')
402-
tm.assert_equal(result, False)
401+
assert not result
403402

404403
def test_should_return_bigquery_strings_as_python_strings(self):
405404
result = gbq._parse_entry('STRING', 'STRING')
406-
tm.assert_equal(result, 'STRING')
405+
assert result == 'STRING'
407406

408407
def test_to_gbq_should_fail_if_invalid_table_name_passed(self):
409408
with pytest.raises(gbq.NotFoundException):
@@ -709,7 +708,7 @@ def test_index_column(self):
709708
private_key=_get_private_key_path())
710709
correct_frame = DataFrame(
711710
{'string_1': ['a'], 'string_2': ['b']}).set_index("string_1")
712-
tm.assert_equal(result_frame.index.name, correct_frame.index.name)
711+
assert result_frame.index.name == correct_frame.index.name
713712

714713
def test_column_order(self):
715714
query = "SELECT 'a' AS string_1, 'b' AS string_2, 'c' AS string_3"

0 commit comments

Comments
 (0)