Testing warnings

View: New views
2 Messages — Rating Filter:   Alert me  

Testing warnings

by Jeremy Dunck :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


I'm preparing a patch to make querysets call warnings.warn  
if .iterator is used multiple times on a single qs.

I don't see any examples of verification of warnings in the current  
test suite. Any suggestions on how best to test this?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django developers" group.
To post to this group, send email to django-developers@...
To unsubscribe from this group, send email to django-developers+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Testing warnings

by Alex Gaynor :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On Wed, Nov 4, 2009 at 8:19 PM, Jeremy Dunck <jdunck@...> wrote:

>
> I'm preparing a patch to make querysets call warnings.warn
> if .iterator is used multiple times on a single qs.
>
> I don't see any examples of verification of warnings in the current
> test suite. Any suggestions on how best to test this?
>
>
> >
>

Warnings should just go to stdout (or perhaps stderr) in any event it
should be similar to picking up on a print statement wouldn't they?

Alex

--
"I disapprove of what you say, but I will defend to the death your
right to say it." -- Voltaire
"The people's good is the highest law." -- Cicero
"Code can always be simpler than you think, but never as simple as you
want" -- Me

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django developers" group.
To post to this group, send email to django-developers@...
To unsubscribe from this group, send email to django-developers+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---