From 015c87b5e1c3023a3fea229d235273093b17496d Mon Sep 17 00:00:00 2001 From: Eli Uriegas Date: Tue, 11 Apr 2017 16:02:57 -0500 Subject: [PATCH] Add traceback for better debugging --- sanic/testing.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sanic/testing.py b/sanic/testing.py index 1cad6a7b..787106a6 100644 --- a/sanic/testing.py +++ b/sanic/testing.py @@ -1,3 +1,5 @@ +import traceback + from sanic.log import log HOST = '127.0.0.1' @@ -50,6 +52,8 @@ class SanicTestClient: **request_kwargs) results[-1] = response except Exception as e: + log.error( + 'Exception:\n{}'.format(traceback.format_exc())) exceptions.append(e) self.app.stop()