if I don't
have a value that is a Decimal object something is wrong.
Cheers,
T
Original-Nachricht
Datum: Tue, 14 Jul 2009 22:36:14 -0400
Von: Dave Angel
An:
CC: Todd Matsumoto , tutor@python.org
Betreff: Re: Re: [Tutor] unittests, testing a type
On T
ve a value that is a Decimal object something is wrong.
Cheers,
T
Original-Nachricht
> Datum: Tue, 14 Jul 2009 22:36:14 -0400
> Von: Dave Angel
> An:
> CC: Todd Matsumoto , tutor@python.org
> Betreff: Re: Re: [Tutor] unittests, testing a type
> On Tue, J
On Tue, Jul 14, 2009 at 9:59 AM, Todd Matsumoto wrote:
The reason why is I'm receiving the Decimal value from another program, if I
already know that the value will be a Decimal why test it?
How are you receiving it? File, pickle, pipe, socket, exit() return
value? When I first read
On Tue, Jul 14, 2009 at 9:59 AM, Todd Matsumoto wrote:
> Okay,
>
> Thanks that worked.
>
> I still needed to import the Decimal class and I'm not sure that is okay.
Sure, why not?
> The reason why is I'm receiving the Decimal value from another program, if I
> already know that the value will be
On Tue, Jul 14, 2009 at 9:45 AM, A.T.Hofkamp wrote:
> Todd Matsumoto wrote:
>>
>> Hi,
>>
>> Does anyone know how to do a unittest assert for a type?
> For new-style classes, you should be able to do
>
>
> type(result) is Decimal
When possible, it's better to use assertEqual() rather than a plain
his test-driven development thing.
Cheers,
T
Original-Nachricht
> Datum: Tue, 14 Jul 2009 15:45:18 +0200
> Von: "A.T.Hofkamp"
> An: Todd Matsumoto
> CC: "tutor@python.org"
> Betreff: Re: [Tutor] unittests, testing a type
> Todd Matsumoto
Todd Matsumoto wrote:
Hi,
Does anyone know how to do a unittest assert for a type?
So If you have a program returning a Decimal, lets say Decimal("1"), and you
want to make sure that what is returned is a Decimal object.
At first I thought of importing Decimal and making my own Decimal("1")
Hi,
Does anyone know how to do a unittest assert for a type?
So If you have a program returning a Decimal, lets say Decimal("1"), and you
want to make sure that what is returned is a Decimal object.
At first I thought of importing Decimal and making my own Decimal("1") and
doing an assertEqua