|
9 | 9 | import logging |
10 | 10 |
|
11 | 11 | import numpy as np |
12 | | -import pytest |
13 | 12 |
|
14 | 13 | from distutils.version import StrictVersion |
15 | 14 | from pandas import compat |
@@ -415,23 +414,23 @@ def test_import_google_api_python_client(self): |
415 | 414 |
|
416 | 415 | def test_should_return_bigquery_integers_as_python_ints(self): |
417 | 416 | result = gbq._parse_entry(1, 'INTEGER') |
418 | | - tm.assert_equal(result, int(1)) |
| 417 | + assert result == int(1) |
419 | 418 |
|
420 | 419 | def test_should_return_bigquery_floats_as_python_floats(self): |
421 | 420 | result = gbq._parse_entry(1, 'FLOAT') |
422 | | - tm.assert_equal(result, float(1)) |
| 421 | + assert result == float(1) |
423 | 422 |
|
424 | 423 | def test_should_return_bigquery_timestamps_as_numpy_datetime(self): |
425 | 424 | result = gbq._parse_entry('0e9', 'TIMESTAMP') |
426 | | - tm.assert_equal(result, np_datetime64_compat('1970-01-01T00:00:00Z')) |
| 425 | + assert result == np_datetime64_compat('1970-01-01T00:00:00Z') |
427 | 426 |
|
428 | 427 | def test_should_return_bigquery_booleans_as_python_booleans(self): |
429 | 428 | result = gbq._parse_entry('false', 'BOOLEAN') |
430 | | - tm.assert_equal(result, False) |
| 429 | + assert not result |
431 | 430 |
|
432 | 431 | def test_should_return_bigquery_strings_as_python_strings(self): |
433 | 432 | result = gbq._parse_entry('STRING', 'STRING') |
434 | | - tm.assert_equal(result, 'STRING') |
| 433 | + assert result == 'STRING' |
435 | 434 |
|
436 | 435 | def test_to_gbq_should_fail_if_invalid_table_name_passed(self): |
437 | 436 | with pytest.raises(gbq.NotFoundException): |
@@ -737,7 +736,7 @@ def test_index_column(self): |
737 | 736 | private_key=_get_private_key_path()) |
738 | 737 | correct_frame = DataFrame( |
739 | 738 | {'string_1': ['a'], 'string_2': ['b']}).set_index("string_1") |
740 | | - tm.assert_equal(result_frame.index.name, correct_frame.index.name) |
| 739 | + assert result_frame.index.name == correct_frame.index.name |
741 | 740 |
|
742 | 741 | def test_column_order(self): |
743 | 742 | query = "SELECT 'a' AS string_1, 'b' AS string_2, 'c' AS string_3" |
|
0 commit comments