I use Python\'s unittest module and want to check if two complex data structures are equal. The objects can be lists of dicts with all sorts of values: numbers,
unittest
check numpy.testing.assert_almost_equal which "raises an AssertionError if two items are not equal up to desired precision", e.g.:
numpy.testing.assert_almost_equal
import numpy.testing as npt npt.assert_almost_equal(np.array([1.0,2.3333333333333]), np.array([1.0,2.33333334]), decimal=9)