Skip to content

Commit

Permalink
test: adjust assertions about pyarrow column values (#192)
Browse files Browse the repository at this point in the history
  • Loading branch information
plamut authored Jul 25, 2020
1 parent b39462c commit e5fecce
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/unit/test__pandas_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -1226,10 +1226,10 @@ def test_download_arrow_tabledata_list_unknown_field_type(module_under_test):
assert len(result.columns) == 2
col = result.columns[0]
assert type(col) is pyarrow.lib.Int64Array
assert list(col) == [1, 10, 100]
assert col.to_pylist() == [1, 10, 100]
col = result.columns[1]
assert type(col) is pyarrow.lib.DoubleArray
assert list(col) == [2.2, 22.22, 222.222]
assert col.to_pylist() == [2.2, 22.22, 222.222]


@pytest.mark.skipif(isinstance(pyarrow, mock.Mock), reason="Requires `pyarrow`")
Expand Down Expand Up @@ -1261,10 +1261,10 @@ def test_download_arrow_tabledata_list_known_field_type(module_under_test):
assert len(result.columns) == 2
col = result.columns[0]
assert type(col) is pyarrow.lib.Int64Array
assert list(col) == [1, 10, 100]
assert col.to_pylist() == [1, 10, 100]
col = result.columns[1]
assert type(col) is pyarrow.lib.StringArray
assert list(col) == ["2.2", "22.22", "222.222"]
assert col.to_pylist() == ["2.2", "22.22", "222.222"]


@pytest.mark.skipif(isinstance(pyarrow, mock.Mock), reason="Requires `pyarrow`")
Expand All @@ -1288,10 +1288,10 @@ def test_download_arrow_tabledata_list_dict_sequence_schema(module_under_test):
assert len(result.columns) == 2
col = result.columns[0]
assert type(col) is pyarrow.lib.Int64Array
assert list(col) == [1, 10, 100]
assert col.to_pylist() == [1, 10, 100]
col = result.columns[1]
assert type(col) is pyarrow.lib.StringArray
assert list(col) == ["2.2", "22.22", "222.222"]
assert col.to_pylist() == ["2.2", "22.22", "222.222"]


@pytest.mark.skipif(pandas is None, reason="Requires `pandas`")
Expand Down

0 comments on commit e5fecce

Please sign in to comment.