Added separate module for testing

This commit is contained in:
Armin Ronacher 2010-07-05 10:31:18 +02:00
parent c34b03e9a6
commit df3f8940c3
4 changed files with 44 additions and 23 deletions

View file

@ -60,6 +60,7 @@ class _RequestContext(object):
# exception happened. This will allow the debugger to still
# access the request object in the interactive shell. Furthermore
# the context can be force kept alive for the test client.
# See flask.testing for how this works.
if not self.request.environ.get('flask._preserve_context') and \
(tb is None or not self.app.debug):
self.pop()