How to do assert almost equal with py.test for floats without resorting to something like:
assert almost equal
assert x - 0.00001 <= y <= x + 0.00001 <
assert x - 0.00001 <= y <= x + 0.00001
I'd use nose.tools. It plays well with py.test runner and have other equally useful asserts - assert_dict_equal(), assert_list_equal(), etc.
from nose.tools import assert_almost_equals assert_almost_equals(x, y, places=7) #default is 7