File pytest9.patch of Package python-google-auth

From 5c372a92bf5086f1b63eaa8979fc13c5c0ce9dc9 Mon Sep 17 00:00:00 2001
From: Lingqing Gan <lingqing.gan@gmail.com>
Date: Mon, 10 Nov 2025 15:58:56 -0800
Subject: [PATCH] chore: update secret and fix pytest issue  (#1868)

---
 system_tests/secrets.tar.enc         | Bin 10324 -> 10324 bytes
 tests/transport/aio/test_sessions.py |  22 ++++++++++++++++------
 2 files changed, 16 insertions(+), 6 deletions(-)

diff --git a/tests/transport/aio/test_sessions.py b/tests/transport/aio/test_sessions.py
index c91a7c40a..742f863d0 100644
--- a/tests/transport/aio/test_sessions.py
+++ b/tests/transport/aio/test_sessions.py
@@ -32,8 +32,13 @@
 
 
 @pytest.fixture
-async def simple_async_task():
-    return True
+def simple_async_task():
+    # Wrap async fixture within a synchronous fixture to suppress pytest.PytestRemovedIn9Warning
+    # See https://docs.pytest.org/en/stable/deprecations.html#sync-test-depending-on-async-fixture
+    async def inner_fixture():
+        return True
+
+    return inner_fixture()
 
 
 class MockRequest(Request):
@@ -151,10 +156,15 @@ class TestAsyncAuthorizedSession(object):
     credentials = AnonymousCredentials()
 
     @pytest.fixture
-    async def mocked_content(self):
-        content = [b"Cavefish ", b"have ", b"no ", b"sight."]
-        for chunk in content:
-            yield chunk
+    def mocked_content(self):
+        # Wrap async fixture within a synchronous fixture to suppress pytest.PytestRemovedIn9Warning
+        # See https://docs.pytest.org/en/stable/deprecations.html#sync-test-depending-on-async-fixture
+        async def inner_fixture():
+            content = [b"Cavefish ", b"have ", b"no ", b"sight."]
+            for chunk in content:
+                yield chunk
+
+        return inner_fixture()
 
     @pytest.mark.asyncio
     async def test_constructor_with_default_auth_request(self):
openSUSE Build Service is sponsored by