[TIP] doctest and floats
betatim at gmail.com
Mon Mar 10 01:58:23 PDT 2008
if you want to test a function that returns a float, what is the "one
way" to write that down in a doctest?
this will fail on the second one because 0.1 is one of these numbers
that can be represented completely in binary.
It feels wrong to write
does not work either.
Does anyone of you clever people have some experience with how to do
More information about the testing-in-python