File tree 1 file changed +4
-8
lines changed
1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change 12
12
from pandas import DataFrame , compat
13
13
import pandas .util .testing as tm
14
14
15
- try :
16
- from unittest import mock
17
- except ImportError :
18
- mock = pytest .importorskip ("mock" )
19
-
20
-
21
15
api_exceptions = pytest .importorskip ("google.api_core.exceptions" )
22
16
bigquery = pytest .importorskip ("google.cloud.bigquery" )
23
17
service_account = pytest .importorskip ("google.oauth2.service_account" )
@@ -104,8 +98,10 @@ def make_mixed_dataframe_v2(test_size):
104
98
def test_read_gbq_without_dialect_warns_future_change (monkeypatch ):
105
99
# Default dialect is changing to standard SQL. See:
106
100
# https://github.com/pydata/pandas-gbq/issues/195
107
- mock_read_gbq = mock .Mock ()
108
- mock_read_gbq .return_value = DataFrame ([[1.0 ]])
101
+
102
+ def mock_read_gbq (* args , ** kwargs ):
103
+ return DataFrame ([[1.0 ]])
104
+
109
105
monkeypatch .setattr (pandas_gbq , 'read_gbq' , mock_read_gbq )
110
106
with tm .assert_produces_warning (FutureWarning ):
111
107
pd .read_gbq ("SELECT 1" )
You can’t perform that action at this time.
0 commit comments