File tree Expand file tree Collapse file tree
packages/google-api-core/tests/unit/observability Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -65,7 +65,10 @@ def test_get_env_bool(monkeypatch):
6565 assert _get_env_bool ("TEST_VAR" ) is True
6666
6767 monkeypatch .setenv ("TEST_VAR" , "invalid" )
68- assert _get_env_bool ("TEST_VAR" ) is None
68+ import pytest
69+
70+ with pytest .warns (RuntimeWarning , match = "Ignored invalid value" ):
71+ assert _get_env_bool ("TEST_VAR" ) is None
6972
7073 monkeypatch .delenv ("TEST_VAR" , raising = False )
7174 assert _get_env_bool ("TEST_VAR" ) is None
@@ -111,7 +114,9 @@ def test_resolve_feature_flags_ga_enabled_via_env():
111114def test_resolve_feature_flags_exp_blocked_with_provider_fails_fast (exp_env_state ):
112115 """Verify that passing a provider to an experimental feature raises ValueError if the experimental environment variable is disabled or missing."""
113116 # Setup: Experimental env var is set to exp_env_state (None means not set)
114- set_test_env_override ("GOOGLE_SDK_EXPERIMENTAL_PYTHON_TRACING_ENABLED" , exp_env_state )
117+ set_test_env_override (
118+ "GOOGLE_SDK_EXPERIMENTAL_PYTHON_TRACING_ENABLED" , exp_env_state
119+ )
115120 client_options = {"tracer_provider" : object ()}
116121
117122 # Action & Assertion
You can’t perform that action at this time.
0 commit comments