File tree Expand file tree Collapse file tree 3 files changed +8
-8
lines changed
Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 3434 }
3535
3636
37- @pytest .mark .asyncio
37+ @pytest .mark .asyncio ( loop_scope = "session" )
3838async def test_firestore_async ():
3939 client = firestore_async .client ()
4040 expected = _CITY
@@ -48,7 +48,7 @@ async def test_firestore_async():
4848 data = await doc .get ()
4949 assert data .exists is False
5050
51- @pytest .mark .asyncio
51+ @pytest .mark .asyncio ( loop_scope = "session" )
5252async def test_firestore_async_explicit_database_id ():
5353 client = firestore_async .client (database_id = 'testing-database' )
5454 expected = _CITY
@@ -62,7 +62,7 @@ async def test_firestore_async_explicit_database_id():
6262 data = await doc .get ()
6363 assert data .exists is False
6464
65- @pytest .mark .asyncio
65+ @pytest .mark .asyncio ( loop_scope = "session" )
6666async def test_firestore_async_multi_db ():
6767 city_client = firestore_async .client ()
6868 movie_client = firestore_async .client (database_id = 'testing-database' )
@@ -98,7 +98,7 @@ async def test_firestore_async_multi_db():
9898 assert data [0 ].exists is False
9999 assert data [1 ].exists is False
100100
101- @pytest .mark .asyncio
101+ @pytest .mark .asyncio ( loop_scope = "session" )
102102async def test_server_timestamp ():
103103 client = firestore_async .client ()
104104 expected = {
Original file line number Diff line number Diff line change @@ -157,7 +157,7 @@ def test_unsubscribe():
157157 resp = messaging .unsubscribe_from_topic (_REGISTRATION_TOKEN , 'mock-topic' )
158158 assert resp .success_count + resp .failure_count == 1
159159
160- @pytest .mark .asyncio
160+ @pytest .mark .asyncio ( loop_scope = "session" )
161161async def test_send_each_async ():
162162 messages = [
163163 messaging .Message (
@@ -189,7 +189,7 @@ async def test_send_each_async():
189189 assert isinstance (response .exception , exceptions .InvalidArgumentError )
190190 assert response .message_id is None
191191
192- @pytest .mark .asyncio
192+ @pytest .mark .asyncio ( loop_scope = "session" )
193193async def test_send_each_async_500 ():
194194 messages = []
195195 for msg_number in range (500 ):
@@ -206,7 +206,7 @@ async def test_send_each_async_500():
206206 assert response .exception is None
207207 assert re .match ('^projects/.*/messages/.*$' , response .message_id )
208208
209- @pytest .mark .asyncio
209+ @pytest .mark .asyncio ( loop_scope = "session" )
210210async def test_send_each_for_multicast_async ():
211211 multicast = messaging .MulticastMessage (
212212 notification = messaging .Notification ('Title' , 'Body' ),
Original file line number Diff line number Diff line change 11[tool:pytest]
22testpaths = tests
3- asyncio_default_test_loop_scope = session
3+ asyncio_default_test_loop_scope = class
44asyncio_default_fixture_loop_scope = None
You can’t perform that action at this time.
0 commit comments