File tree Expand file tree Collapse file tree 2 files changed +18
-3
lines changed Expand file tree Collapse file tree 2 files changed +18
-3
lines changed Original file line number Diff line number Diff line change 1
1
betamax == 0.9.0
2
2
betamax-serializers == 0.2.1
3
- pytest == 8.3.4
4
- pytest-asyncio == 0.25 .0
5
- pytest-cov == 6.0.0
3
+ pytest == 8.3.5
4
+ pytest-asyncio == 0.26 .0
5
+ pytest-cov == 6.1.1
6
6
pytest-mock == 3.14.0
Original file line number Diff line number Diff line change 1
1
# standard imports
2
+ import asyncio
2
3
import os
3
4
import time
4
5
@@ -66,3 +67,17 @@ def no_github_token():
66
67
yield
67
68
68
69
os .environ ['GITHUB_TOKEN' ] = og_token
70
+
71
+
72
+ @pytest .fixture (scope = "session" )
73
+ def event_loop ():
74
+ """
75
+ Create an event loop that isn't closed after each test.
76
+
77
+ This is necessary for pytest-asyncio 0.26.0 and later, as it fails to closes the loop after each test.
78
+ """
79
+ loop = asyncio .new_event_loop ()
80
+ asyncio .set_event_loop (loop )
81
+ yield loop
82
+
83
+ loop .close ()
You can’t perform that action at this time.
0 commit comments