Add traceback for better debugging

This commit is contained in:
Eli Uriegas 2017-04-11 16:02:57 -05:00
parent d20a49e500
commit 015c87b5e1

View File

@ -1,3 +1,5 @@
import traceback
from sanic.log import log from sanic.log import log
HOST = '127.0.0.1' HOST = '127.0.0.1'
@ -50,6 +52,8 @@ class SanicTestClient:
**request_kwargs) **request_kwargs)
results[-1] = response results[-1] = response
except Exception as e: except Exception as e:
log.error(
'Exception:\n{}'.format(traceback.format_exc()))
exceptions.append(e) exceptions.append(e)
self.app.stop() self.app.stop()