mirror of
https://github.com/webrecorder/pywb.git
synced 2025-03-24 06:59:52 +01:00
tests/gevent: skip gevent monkey patch when running tests
This commit is contained in:
parent
08cb02c644
commit
4b37d13c34
3
pywb/apps/conftest.py
Normal file
3
pywb/apps/conftest.py
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
def pytest_configure(config):
|
||||||
|
import sys
|
||||||
|
sys._called_from_test = True
|
@ -1,8 +1,11 @@
|
|||||||
# Use gevent if available
|
import sys
|
||||||
try:
|
|
||||||
from gevent.monkey import patch_all; patch_all()
|
if not hasattr(sys, '_called_from_test'): #pragma: no cover
|
||||||
except Exception as e:
|
# Use gevent if available
|
||||||
pass
|
try:
|
||||||
|
from gevent.monkey import patch_all; patch_all()
|
||||||
|
except Exception as e:
|
||||||
|
pass
|
||||||
|
|
||||||
from pywb.framework.wsgi_wrappers import init_app
|
from pywb.framework.wsgi_wrappers import init_app
|
||||||
from pywb.webapp.pywb_init import create_wb_router
|
from pywb.webapp.pywb_init import create_wb_router
|
||||||
|
Loading…
x
Reference in New Issue
Block a user