File tree Expand file tree Collapse file tree 1 file changed +12
-8
lines changed
Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change 88from sentry_sdk .utils import _is_threading_local_monkey_patched
99
1010
11+ def try_gevent_patch_all ():
12+ try :
13+ gevent .monkey .patch_all ()
14+ except Exception as e :
15+ if "_RLock__owner" in str (e ):
16+ pytest .skip ("https://github.com/gevent/gevent/issues/1380" )
17+ else :
18+ raise
19+
20+
1121def test_gevent_is_patched ():
12- gevent . monkey . patch_all ()
22+ try_gevent_patch_all ()
1323 assert _is_threading_local_monkey_patched ()
1424
1525
@@ -20,13 +30,7 @@ def test_gevent_is_not_patched():
2030@pytest .mark .parametrize ("with_gevent" , [True , False ])
2131def test_leaks (with_gevent ):
2232 if with_gevent :
23- try :
24- gevent .monkey .patch_all ()
25- except Exception as e :
26- if "_RLock__owner" in str (e ):
27- pytest .skip ("https://github.com/gevent/gevent/issues/1380" )
28- else :
29- raise
33+ try_gevent_patch_all ()
3034
3135 import threading
3236
You can’t perform that action at this time.
0 commit comments