Changed assertEqual to assertAlmostEqual in several places to avoid failures due to precision differences across OS type