Re: Python2.6 and Decimals in tests

2009-01-13 Thread Alex Gaynor
On Tue, Jan 13, 2009 at 3:04 PM, Ivan Sagalaev wrote: > > Alex Gaynor wrote: > > Probably stupid question > > Which it was :-). I didn't realize that it's doctests. > > > you need to replace it with > > >>> Decimal("3.0") == Decimal('3.0') > > True > > So why not? > > > > If you look at the s

Re: Python2.6 and Decimals in tests

2009-01-13 Thread Ivan Sagalaev
Alex Gaynor wrote: > Probably stupid question Which it was :-). I didn't realize that it's doctests. > you need to replace it with > >>> Decimal("3.0") == Decimal('3.0') > True So why not? --~--~-~--~~~---~--~~ You received this message because you are subs

Re: Python2.6 and Decimals in tests

2009-01-13 Thread Alex Gaynor
On Tue, Jan 13, 2009 at 2:59 PM, Ivan Sagalaev wrote: > > Russell Keith-Magee wrote: > > Expected: > >[('id', 2), ('isbn', u'067232959'), ('manufacture_cost', > > ...11.545...), ('mean_auth_age', 45.0), ('name', u'Sams Teach Yourself > > Django in 24 Hours'), ('pages', 528), ('price', Decimal(

Re: Python2.6 and Decimals in tests

2009-01-13 Thread Ivan Sagalaev
Russell Keith-Magee wrote: > Expected: >[('id', 2), ('isbn', u'067232959'), ('manufacture_cost', > ...11.545...), ('mean_auth_age', 45.0), ('name', u'Sams Teach Yourself > Django in 24 Hours'), ('pages', 528), ('price', Decimal("23.09")), > ('pubdate', datetime.date(2008, 3, 3)), ('publisher_i

Re: Python2.6 and Decimals in tests

2009-01-13 Thread Alex Gaynor
On Tue, Jan 13, 2009 at 8:30 AM, Jeremy Dunck wrote: > > On Tue, Jan 13, 2009 at 6:45 AM, Alex Gaynor > wrote: > > > > > > On Tue, Jan 13, 2009 at 7:40 AM, Russell Keith-Magee > > wrote: > > >> Can anyone shed any light on the workaround for this? Is the only > >> solution to rewrite the t

Re: Python2.6 and Decimals in tests

2009-01-13 Thread Jeremy Dunck
On Tue, Jan 13, 2009 at 6:45 AM, Alex Gaynor wrote: > > > On Tue, Jan 13, 2009 at 7:40 AM, Russell Keith-Magee > wrote: >> Can anyone shed any light on the workaround for this? Is the only >> solution to rewrite the test so that it doesn't depend on the output >> format of __repr__? >> >> Y

Re: Python2.6 and Decimals in tests

2009-01-13 Thread Alex Gaynor
On Tue, Jan 13, 2009 at 7:40 AM, Russell Keith-Magee wrote: > > Hi all, > > I'm was just about ready to commit ticket #3566, but then Justin Bronn > threw a spanner in my works :-) > > Justin pointed out a number of test failures that stem from the change > in Decimal.__repr__() to use single quo

Python2.6 and Decimals in tests

2009-01-13 Thread Russell Keith-Magee
Hi all, I'm was just about ready to commit ticket #3566, but then Justin Bronn threw a spanner in my works :-) Justin pointed out a number of test failures that stem from the change in Decimal.__repr__() to use single quotes rather than double quotes in Python 2.6. The problems present like this