Jamie Wilkinson wrote: > Dunno how many of you are using paste.fixture to be good little programmers > and test your webapps, but hopefully you all are and have come up with a > solution to this one: > > I'm often getting errors trapped by the exception handler in Pylons, and in > normal operations this would be fine, because it'd redirect to the debugger, > and you get the opportunity to see the traceback. > > Within paste.fixture, when this happens, you don't get a useful traceback, > you get a traceback from wsgilib throwing an AssertionError: No Errors > should be written, because it caught an AssertionError: no errors should be > written (ironic?).. because it caught "Debug at: > http://localhost/_debug/view/...". > > So what I really want is to see the real traceback in the test suite runner > that I'd be seeing in the browser. > > Has anyone found a good workaround to this? > > If not, does anyone know where the best place to start tracing this back so > I can patch paste to re-raise the correct exception? > > which leads me to ask.. Why does paste even worry that an error was written? > (Maybe that's a better question for the paste list?)
The error-catcher shouldn't be in place, or at least not activated. When using paste.fixture it sets environ['paste.throw_errors'] = True, which both error catchers should(?) respect and thus let exceptions bubble all the way up to your test runner. This is done in paste.evalexception.middleware:275 and paste.exceptions.errormiddleware:128. -- Ian Bicking | [EMAIL PROTECTED] | http://blog.ianbicking.org --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/pylons-discuss -~----------~----~----~----~------~----~------~--~---
