Re: #13717: What to do next?

2010-10-22 Thread Jacob Kaplan-Moss
On Fri, Oct 22, 2010 at 11:21 AM, Silvio  wrote:
> I opened ticket #13717, and it seems to be reproducible by other
> people. Someone contributed a patch, but the ticket is "stuck" because
> it needs tests.
>
> I would really like to see this fixed by 1.3, so I'd be more than
> happy to write these and submit them. But I'm not sure in which file
> the tests belong. I'd appreciate any pointers.

Yeah, sorry about that -- the test suite organization is a bit of a
mess. The general idea when you're adding new tests is that you'd
ideally like to group 'em with other tests of the same functionality.
In the (increasingly rare) case that the feature you want to test
isn't covered yet you can make a new test app for it.

What I usually do when I'm looking for the correct place to add tests
is to grep [1] over the existing test suite looking for existing code
that already covers the same place. If I search for "unique_for" in
the existing test suite, I find that string in the following files:

tests/modeltests/model_forms/models.py
tests/modeltests/model_forms/tests.py
tests/modeltests/model_formsets/models.py
tests/modeltests/validation/models.py
tests/modeltests/validation/test_unique.py

That last file, "test_unique.py" seems like a good candiate, and if I
crack it open I see test functions like
test_unique_for_date_exclusion() and
test_unique_for_date_gets_picked_up(), so seems like that'd be a
pretty good place for the tests for #13717/

Thanks for helping out!

Jacob

[1] Ack, actually: http://betterthangrep.com/

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



#13717: What to do next?

2010-10-22 Thread Silvio
Hey guys,

I opened ticket #13717, and it seems to be reproducible by other
people. Someone contributed a patch, but the ticket is "stuck" because
it needs tests.

I would really like to see this fixed by 1.3, so I'd be more than
happy to write these and submit them. But I'm not sure in which file
the tests belong. I'd appreciate any pointers.

Thanks,

Silvio

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