Hello! Please bear in mind that I use Postgres and SQLite; I stopped using MySQL long time ago, so I cannot fix MySQL-related problems. I have to rely on other people's patches.
On Mon, Jun 30, 2008 at 01:21:16PM -0700, Golemon, Buck wrote: > Here are my test results for the SO test suite. Some sources of errors: > > * Many of the asserts use a string where the MySQLdb cursor returns and > integer. Do you mean this one? > assert IntAccumulator.select().min(IntAccumulator.q.value) == 1 > E assert IntAccumulator.select().avg(IntAccumulator.q.value) == 2 > > assert '2.0000' == 2 > + where '2.0000' = <SelectResults at > 2a9ae10b10>.avg(int_accumulator.value) > + where <SelectResults at 2a9ae10b10> = IntAccumulator.select() > + and int_accumulator = IntAccumulator.q > [/home/bgolemon/SQLObject/sqlobject/tests/test_aggregates.py:22] I interpret this the other way around - MySQLdb returns strings where it have to return integers. > * col.py does not allow for the cursor returning a datetime.timedelta > object. (I > didn't know this ever happened either.) In DateTime column? > * There are a few instances where a column is typed as 'text' and then > used as a > key, but mysql doesn't allow this unless you specify a prefix. The > blob/text > types shouldn't be used for simple fields like 'name'. Limit the length of the fields: StringCol(length=255). > * A couple asserts compare the row return value to a list, but the row > is a > tuple and will never compare equal with a list. Don't hesitate to convert returned values to lists (or tuples). > I'd try to fix them myself, but I'd probably break more than I fixed... Please post a patch or submit it to the SF tracker so we can discuss and improve it. Oleg. -- Oleg Broytmann http://phd.pp.ru/ [EMAIL PROTECTED] Programmers don't die, they just GOSUB without RETURN. ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ sqlobject-discuss mailing list sqlobject-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss