twill testing

18 views
Skip to first unread message

Luke Plant

unread,
May 15, 2008, 6:36:32 PM5/15/08
to django-d...@googlegroups.com
Hi all,

I've been using twill integrated into Django unit tests (as described
here: http://www.djangosnippets.org/snippets/665/ ), but came across
the problem that exceptions are hidden by Django's exception
handling, so it's very difficult to tell what has gone wrong if you
have a bug. The patch attached adds a setting to allow exceptions to
be propagated by BaseHandler.get_response(). Would anyone object to
this? I couldn't think of a better name for the setting, suggestions
welcomed.

Luke

--
Noise proves nothing. Often a hen who has merely laid an egg cackles
as if she laid an asteroid.
-- Mark Twain

Luke Plant || http://lukeplant.me.uk/

twill_debugging_patch.diff

Simon Willison

unread,
May 16, 2008, 7:29:40 AM5/16/08
to Django developers
On May 15, 11:36 pm, Luke Plant <L.Plant...@cantab.net> wrote:
> I've been using twill integrated into Django unit tests (as described
> here:http://www.djangosnippets.org/snippets/665/), but came across
> the problem that exceptions are hidden by Django's exception
> handling, so it's very difficult to tell what has gone wrong if you
> have a bug. The patch attached adds a setting to allow exceptions to
> be propagated by BaseHandler.get_response(). Would anyone object to
> this?

I've been bitten by exactly this issue (using Twill, as it happens) so
a big +1 from me.

DEBUG_PROPAGATE_EXCEPTIONS might be a better name for the setting.

Cheers,

Simon
Reply all
Reply to author
Forward
0 new messages