Skip to content

Commit 7cd4b78

Browse files
committed
skip 2 tests due to oauth2client incompatibility
1 parent 66fd2b4 commit 7cd4b78

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

tests/test__oauth2client.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,14 @@ def test__convert_appengine_app_assertion_credentials(
116116
app_identity, mock_oauth2client_gae_imports
117117
):
118118

119+
# `oauth2client` requires `cgi` which was removed in Python 3.13
120+
# See https://github.com/googleapis/oauth2client/blob/50d20532a748f18e53f7d24ccbe6647132c979a9/oauth2client/contrib/appengine.py#L20
121+
# oauth2client is no longer being updated so this test must be skipped on newer Python Runtimes
122+
if sys.version_info >= (3, 13):
123+
pytest.skip(
124+
"Skipping test for Python 3.13+ due to oauth2client incompatibility."
125+
)
126+
119127
import oauth2client.contrib.appengine # type: ignore
120128

121129
service_account_id = "service_account_id"
@@ -165,6 +173,14 @@ def reset__oauth2client_module():
165173
def test_import_has_app_engine(
166174
mock_oauth2client_gae_imports, reset__oauth2client_module
167175
):
176+
# `oauth2client` requires `cgi` which was removed in Python 3.13
177+
# See https://github.com/googleapis/oauth2client/blob/50d20532a748f18e53f7d24ccbe6647132c979a9/oauth2client/contrib/appengine.py#L20
178+
# oauth2client is no longer being updated so this test must be skipped on newer Python Runtimes
179+
if sys.version_info >= (3, 13):
180+
pytest.skip(
181+
"Skipping test for Python 3.13+ due to oauth2client incompatibility."
182+
)
183+
168184
importlib.reload(_oauth2client)
169185
assert _oauth2client._HAS_APPENGINE
170186

0 commit comments

Comments
 (0)