Use assertAlmostEqual from unittest.