[pypy-dev] Re: having broken the back of the unittest conversion problem ...
Michael Hudson
mwh at python.net
Thu Jun 17 11:05:52 CEST 2004
holger krekel <hpk at trillke.net> writes:
>> # And I am even more clueless about what you want me to do
>> # about these friends.
>>
>> #def failUnlessAlmostEqual(self, first, second, places=7, msg=None):
>> #assertAlmostEqual = assertAlmostEquals = failUnlessAlmostEqual
>>
>> #def failIfAlmostEqual(self, first, second, places=7, msg=None):
>> #assertNotAlmostEqual = assertNotAlmostEquals = failIfAlmostEqual
>
> these are new in python2.3 IIRC and can be (if we use it at all)
> converted to:
>
> assert round(first-second, 7) == 0
>
> and
>
> assert round(first-second, 7) != 0
>
> respectively.
If we use these at all, I'd like to have words with whoever introduced
the usage :-)
Mutter mutter, fp-induced paranoia, ...
Cheers,
mwh
--
If you have too much free time and can't think of a better way to
spend it than reading Slashdot, you need a hobby, a job, or both.
-- http://www.cs.washington.edu/homes/klee/misc/slashdot.html#faq
More information about the Pypy-dev
mailing list