File tree Expand file tree Collapse file tree 2 files changed +18
-5
lines changed Expand file tree Collapse file tree 2 files changed +18
-5
lines changed Original file line number Diff line number Diff line change @@ -2076,7 +2076,7 @@ def test_get_experiment_df_passes_experiment_variable(
2076
2076
_ , kwargs = query_experiment_row_mock .call_args_list [0 ]
2077
2077
TestCase .assertTrue (self , kwargs ["experiment" ].name == _TEST_EXPERIMENT )
2078
2078
2079
- @pytest .mark .skipif (sys .version_info = = (3 , 9 ), reason = "flaky" )
2079
+ @pytest .mark .skipif (sys .version_info < = (3 , 9 ), reason = "flaky" )
2080
2080
@pytest .mark .usefixtures (
2081
2081
"get_experiment_mock" ,
2082
2082
"list_tensorboard_time_series_mock" ,
Original file line number Diff line number Diff line change 19
19
from unittest import mock
20
20
import pytest
21
21
import sys
22
+ from google import auth
22
23
from vertexai .resources .preview .feature_store import (
23
24
offline_store ,
24
25
FeatureGroup ,
25
26
Feature ,
26
27
)
27
28
28
- pytestmark = pytest .mark .skipif (
29
- sys .version_info == (3 , 8 ), reason = "bigframes is not supported in Python 3.8"
30
- )
29
+ pytestmark = [
30
+ pytest .mark .skipif (
31
+ sys .version_info < (3 , 10 ), reason = "bigframes is not supported in Python < 3.10"
32
+ ),
33
+ pytest .mark .usefixtures ("google_auth_mock" ),
34
+ ]
31
35
32
36
try :
33
37
import pandas as pd
@@ -131,7 +135,16 @@ def select_dtypes(self, *args):
131
135
import bigframes .pandas as bpd # noqa: E402
132
136
133
137
134
- pytestmark = pytest .mark .usefixtures ("google_auth_mock" )
138
+ @pytest .fixture ()
139
+ def google_auth_mock ():
140
+ with mock .patch .object (auth , "default" ) as google_auth_mock :
141
+ credentials_mock = mock .Mock ()
142
+ credentials_mock .with_quota_project .return_value = None
143
+ google_auth_mock .return_value = (
144
+ credentials_mock ,
145
+ "test-project" ,
146
+ )
147
+ yield google_auth_mock
135
148
136
149
137
150
@pytest .fixture ()
You can’t perform that action at this time.
0 commit comments