tests: activate faulthandler if available
This commit is contained in:
parent
efed9da474
commit
53d882dcbd
|
@ -5,6 +5,7 @@ mock==2.0.0
|
|||
pytz==2018.5
|
||||
cffi==1.11.2 # Random pin to try and fix pyparser==2.18 not having effect
|
||||
pycparser==2.18 # Last version supporting 2.6.
|
||||
faulthandler==3.1; python_version < '3.3' # used by testlib
|
||||
pytest-catchlog==1.2.2
|
||||
pytest==3.1.2
|
||||
PyYAML==3.11; python_version < '2.7'
|
||||
|
|
|
@ -14,6 +14,11 @@ import mitogen.core
|
|||
import mitogen.master
|
||||
import mitogen.utils
|
||||
|
||||
try:
|
||||
import faulthandler
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
try:
|
||||
import urlparse
|
||||
except ImportError:
|
||||
|
@ -32,6 +37,9 @@ sys.path.append(DATA_DIR)
|
|||
if mitogen.is_master:
|
||||
mitogen.utils.log_to_file()
|
||||
|
||||
if faulthandler is not None:
|
||||
faulthandler.enable()
|
||||
|
||||
|
||||
def data_path(suffix):
|
||||
path = os.path.join(DATA_DIR, suffix)
|
||||
|
|
Loading…
Reference in New Issue