mirror of
https://github.com/webrecorder/pywb.git
synced 2025-03-15 00:03:28 +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
|
||||
try:
|
||||
from gevent.monkey import patch_all; patch_all()
|
||||
except Exception as e:
|
||||
pass
|
||||
import sys
|
||||
|
||||
if not hasattr(sys, '_called_from_test'): #pragma: no cover
|
||||
# Use gevent if available
|
||||
try:
|
||||
from gevent.monkey import patch_all; patch_all()
|
||||
except Exception as e:
|
||||
pass
|
||||
|
||||
from pywb.framework.wsgi_wrappers import init_app
|
||||
from pywb.webapp.pywb_init import create_wb_router
|
||||
|
Loading…
x
Reference in New Issue
Block a user