Skip to content

Commit

Permalink
Modify test - *all* warnings should be pyarrow's
Browse files Browse the repository at this point in the history
  • Loading branch information
plamut committed Jul 19, 2019
1 parent 52624b2 commit 7b6aecc
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions bigquery/tests/unit/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -5353,11 +5353,10 @@ def test_load_table_from_dataframe_w_schema_wo_pyarrow(self):
dataframe, self.TABLE_REF, job_config=job_config, location=self.LOCATION
)

# there might be other warnings unrelated to the expected pyarrow warning,
# thus some filtering is necessary
pyarrow_warning = next((w for w in warned if "pyarrow" in str(w)), None)
assert pyarrow_warning is not None
assert pyarrow_warning.category is PendingDeprecationWarning
assert warned # there should be at least one warning
for warning in warned:
assert "pyarrow" in str(warning)
assert warning.category in (DeprecationWarning, PendingDeprecationWarning)

load_table_from_file.assert_called_once_with(
client,
Expand Down

0 comments on commit 7b6aecc

Please sign in to comment.