From 7a97d609a29051be71db1e746b7ccb773f50addf Mon Sep 17 00:00:00 2001 From: ianb Date: Tue, 28 Feb 2006 20:25:58 +0000 Subject: If we don't expect errors in wsgi.errors, raise an exception immediately when the error message is printed, instead of waiting until the end --- paste/fixture.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'paste/fixture.py') diff --git a/paste/fixture.py b/paste/fixture.py index 79c3d87..a44daf6 100644 --- a/paste/fixture.py +++ b/paste/fixture.py @@ -296,7 +296,11 @@ class TestApp(object): try: sys.stdout = out start_time = time.time() - raw_res = wsgilib.raw_interactive(app, req.url, **req.environ) + raise_on_wsgi_error = not req.expect_errors + raw_res = wsgilib.raw_interactive( + app, req.url, + raise_on_wsgi_error=raise_on_wsgi_error + **req.environ) end_time = time.time() finally: sys.stdout = old_stdout -- cgit v1.2.1