Skip to content

Commit f5c07d2

Browse files
committed
[TST] Use tm.assert_produces_warning not pytest.warns
1 parent 4029d97 commit f5c07d2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pandas/tests/io/test_gbq.py

+3-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

@@ -102,7 +103,7 @@ def test_read_gbq_without_dialect_warns_future_change(monkeypatch):
102103
mock_read_gbq = mock.Mock()
103104
mock_read_gbq.return_value = DataFrame([[1.0]])
104105
monkeypatch.setattr(pandas_gbq, 'read_gbq', mock_read_gbq)
105-
with pytest.warns(FutureWarning):
106+
with tm.assert_produces_warning(FutureWarning):
106107
pd.read_gbq("SELECT 1")
107108

108109

0 commit comments

Comments
 (0)