#12074 Fixed patch and added tests.

1 view
Skip to first unread message

David P. Novakovic

unread,
Aug 4, 2010, 6:52:48 PM8/4/10
to django-d...@googlegroups.com
Hey, in the interest of easing myself into helping out I've picked an easy ticket to get done.


I've fixed the patch and added tests.

Let me know if I've missed something, or done something wrong :)

Cheers,

David

Alex Gaynor

unread,
Aug 4, 2010, 6:55:36 PM8/4/10
to django-d...@googlegroups.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-d...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-develop...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-developers?hl=en.
>

Hey David,

Thanks for contributing! The one reccomendation I'd make is to change
the doctests into unittests. I realize a ton of the formsets tests
are doctests, however in general we're trying to move away from them
for a number of reasons (mostly that they're a pain in the ass to
debug). If you could switch those to be unittests I'll mark it as
RFC.

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

David P. Novakovic

unread,
Aug 4, 2010, 7:17:24 PM8/4/10
to django-d...@googlegroups.com
Hey Alex,

Thanks for the feedback. I actually had checked this with Russ earlier, but didn't have a response yet. I prefer TestCases and would be happy to oblige.

I'll move the cases I'm testing to a TestCase in the same file and add the relevant import to regressiontests/forms/tests.py

D

David P. Novakovic

unread,
Aug 4, 2010, 7:45:35 PM8/4/10
to django-d...@googlegroups.com
New patch attached : formset-as_p-as_ul-with-unittests.patch

At the moment it is checking the string literal, something I'm a little opposed to doing. But since it replicates the doctest and all the html seems to be html5 friendly, so it shouldn't be too much of an issue.

Cheers
Reply all
Reply to author
Forward
0 new messages