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 34
34
}
35
35
36
36
37
- @pytest .mark .asyncio
37
+ @pytest .mark .asyncio ( loop_scope = "session" )
38
38
async def test_firestore_async ():
39
39
client = firestore_async .client ()
40
40
expected = _CITY
@@ -48,7 +48,7 @@ async def test_firestore_async():
48
48
data = await doc .get ()
49
49
assert data .exists is False
50
50
51
- @pytest .mark .asyncio
51
+ @pytest .mark .asyncio ( loop_scope = "session" )
52
52
async def test_firestore_async_explicit_database_id ():
53
53
client = firestore_async .client (database_id = 'testing-database' )
54
54
expected = _CITY
@@ -62,7 +62,7 @@ async def test_firestore_async_explicit_database_id():
62
62
data = await doc .get ()
63
63
assert data .exists is False
64
64
65
- @pytest .mark .asyncio
65
+ @pytest .mark .asyncio ( loop_scope = "session" )
66
66
async def test_firestore_async_multi_db ():
67
67
city_client = firestore_async .client ()
68
68
movie_client = firestore_async .client (database_id = 'testing-database' )
@@ -98,7 +98,7 @@ async def test_firestore_async_multi_db():
98
98
assert data [0 ].exists is False
99
99
assert data [1 ].exists is False
100
100
101
- @pytest .mark .asyncio
101
+ @pytest .mark .asyncio ( loop_scope = "session" )
102
102
async def test_server_timestamp ():
103
103
client = firestore_async .client ()
104
104
expected = {
Original file line number Diff line number Diff line change @@ -157,7 +157,7 @@ def test_unsubscribe():
157
157
resp = messaging .unsubscribe_from_topic (_REGISTRATION_TOKEN , 'mock-topic' )
158
158
assert resp .success_count + resp .failure_count == 1
159
159
160
- @pytest .mark .asyncio
160
+ @pytest .mark .asyncio ( loop_scope = "session" )
161
161
async def test_send_each_async ():
162
162
messages = [
163
163
messaging .Message (
@@ -189,7 +189,7 @@ async def test_send_each_async():
189
189
assert isinstance (response .exception , exceptions .InvalidArgumentError )
190
190
assert response .message_id is None
191
191
192
- @pytest .mark .asyncio
192
+ @pytest .mark .asyncio ( loop_scope = "session" )
193
193
async def test_send_each_async_500 ():
194
194
messages = []
195
195
for msg_number in range (500 ):
@@ -206,7 +206,7 @@ async def test_send_each_async_500():
206
206
assert response .exception is None
207
207
assert re .match ('^projects/.*/messages/.*$' , response .message_id )
208
208
209
- @pytest .mark .asyncio
209
+ @pytest .mark .asyncio ( loop_scope = "session" )
210
210
async def test_send_each_for_multicast_async ():
211
211
multicast = messaging .MulticastMessage (
212
212
notification = messaging .Notification ('Title' , 'Body' ),
Original file line number Diff line number Diff line change 1
1
[tool:pytest]
2
2
testpaths = tests
3
- asyncio_default_test_loop_scope = session
3
+ asyncio_default_test_loop_scope = class
4
4
asyncio_default_fixture_loop_scope = None
You can’t perform that action at this time.
0 commit comments