In Python built-in unittest framework, there is an "approximate equality" assertion implemented via assertAlmostEqual() method:
x = 0.1234567890
y = 0.1234567891
Which has the number of decimal places to check configurable.
And, there is a numpy.testing.assert_almost_equal() which also works for the arrays of floats:
import numpy.testing as npt
import numpy as np