use assertAlmostEqual instead of assertEqual

This commit is contained in:
DongshengYang 2019-10-08 01:41:02 -04:00 committed by Dana Van Aken
parent f08204b9d6
commit 309d327a44
1 changed files with 0 additions and 1 deletions

View File

@ -39,6 +39,5 @@ class TestDDPG(unittest.TestCase):
def test_ddpg_ypreds(self):
ypreds_round = [round(self.ddpg.choose_action(x)[0], 4) for x in self.X_test]
expected_ypreds = [0.1778, 0.1914, 0.2607, 0.4459, 0.5660, 0.3836]
self.assertEqual(ypreds_round, expected_ypreds)
for ypred_round, expected_ypred in zip(ypreds_round, expected_ypreds):
self.assertAlmostEqual(ypred_round, expected_ypred, places=6)