Hi,

With the recent drop of Python 2.6, I re-wrote the scenario to get
better error message like this [1]. It allowed to find some misbehavior
between PostgreSQL and SQLite.
The problem is that MySQL again doesn't play well [2] because we have to
put constraint on the DECIMAL column [3] and MySQL doesn't succeed to
return Decimal with the same precision as we send.
I thought about using Decimal.normalize() [4] to get standard format to
test in doctest but I don't like too much because it will hide other
issues (like the one fixed with this change for SQLite).

So I'm calling for ideas…


[1] http://hg.tryton.org/modules/account/rev/3f5a5a854341#l4.1
[2] http://tests.tryton.org/~test/mysql.html
[3] 
http://hg.tryton.org/trytond/file/631515bc8c82/trytond/model/fields/numeric.py#l31
[4] http://docs.python.org/2/library/decimal.html#decimal.Decimal.normalize

-- 
Cédric Krier - B2CK SPRL
Email/Jabber: cedric.kr...@b2ck.com
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/

Attachment: pgpnsiFVh2gTo.pgp
Description: PGP signature

Reply via email to