[Patches] fix test_math.py crash on Win32 (no math.rint())
Moshe Zadka
Moshe Zadka <moshez@math.huji.ac.il>
Thu, 1 Jun 2000 12:50:32 +0300 (IDT)
On Thu, 1 Jun 2000, Trent Mick wrote:
> Discussion:
>
> With the (relatively recent) platform-conditional addition of math.rint to the
> math module, the associate test in test_math causes 'test_math' to crash on
> platforms without rint (i.e. Win32). THis patch makes test_math.py tolerant of
> a platform not having rint.
+1 on the purpose, -0 on the implementation:
why not have a
try:
math.rint
except AttributeError:
pass
else:
....tests with math.rint....
Since I'm extremely paranoid person, I'm afraid this will mask true
AttributeError's in math.rint (it can happen in a sufficiently twisted world.)
--
Moshe Zadka <moshez@math.huji.ac.il>
http://www.oreilly.com/news/prescod_0300.html
http://www.linux.org.il -- we put the penguin in .com