Skip to content

Commit 0de8d22

Browse files
committed
[TST] Use tm.assert_produces_warning not pytest.warns
* Add comment linking to pandas-gbq issue for change in default dialect.
1 parent 4029d97 commit 0de8d22

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

pandas/tests/io/test_gbq.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@
1212
import numpy as np
1313
import pandas as pd
1414
from pandas import compat, DataFrame
15-
1615
from pandas.compat import range
16+
import pandas.util.testing as tm
17+
1718

1819
pandas_gbq = pytest.importorskip('pandas_gbq')
1920

@@ -99,10 +100,12 @@ def make_mixed_dataframe_v2(test_size):
99100

100101

101102
def test_read_gbq_without_dialect_warns_future_change(monkeypatch):
103+
# Default dialect is changing to standard SQL. See:
104+
# https://github.com/pydata/pandas-gbq/issues/195
102105
mock_read_gbq = mock.Mock()
103106
mock_read_gbq.return_value = DataFrame([[1.0]])
104107
monkeypatch.setattr(pandas_gbq, 'read_gbq', mock_read_gbq)
105-
with pytest.warns(FutureWarning):
108+
with tm.assert_produces_warning(FutureWarning):
106109
pd.read_gbq("SELECT 1")
107110

108111

0 commit comments

Comments
 (0)