On Wed, 2007-06-27 at 14:12 -0600, Ian Kelly wrote: > On 6/27/07, Michael Radziej <[EMAIL PROTECTED]> wrote: > > Hi, > > > > it seems I'm the only one to run the test suite with mysql ;-) > > > > Ticket #4711 - http://code.djangoproject.com/ticket/4711 > > > > Currently the tests break because mysql returns 0 or 1 for a BooleanField, > > not False or True. Postgresql returns False or True, and for Oracle there's > > some special code to make it return False or True (ironically, that's how > > the broken test case appeared ...) > > > > So--what shall be done? Clean it up in a slightly backwards incompatible > > way and > > make the mysql backend return proper boolean values, or remove the test > > case? > > Hmm, the test seems to pass for me in mysql. I know that Malcolm > edited those test cases specifically to make them pass in mysql when > he did the merge -- maybe you've somehow gotten an old version of the > file?
Yeah, the code in that bug report looks old (boulder-sprint branch, not trunk code). It was fixed when merged into trunk. It looks like you had a failed "svn switch" somehow or something else has gnoe worng, Michael. The lines of code in your traceback were never part of trunk (they were part of the Oracle branch, though). > In any event, looking back at the test case, it should probably just > be dropped. The reason we finagled Oracle into returning True/False > rather than 1/0 was for consistency because we thought that all the > other backends returned True/False, and because we already had similar > code in place to convert datetimes. It would be nice to be consistent. Unfortunately, I can't see how to do it reliably with MySQL's type coercions. However, I like having the tests there. That is the only place we test a few of those field types (as you noticed initially) and as somebody who relies on the test suite *a lot* as I make changes, I'd be in favour of leaving them. Regards, Malcolm -- Plan to be spontaneous - tomorrow. http://www.pointy-stick.com/blog/ --~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~----------~----~----~----~------~----~------~--~---