From fd6e6b22411d7d5c47c4fdc73c1c94d54c37a845 Mon Sep 17 00:00:00 2001 From: Mateo Date: Fri, 27 Aug 2021 19:05:16 -0400 Subject: [PATCH] Make test inputs floats, not ints --- .../tests/test_ConsRiskyContribModel.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/HARK/ConsumptionSaving/tests/test_ConsRiskyContribModel.py b/HARK/ConsumptionSaving/tests/test_ConsRiskyContribModel.py index d7fc152e0..cf6e5e179 100644 --- a/HARK/ConsumptionSaving/tests/test_ConsRiskyContribModel.py +++ b/HARK/ConsumptionSaving/tests/test_ConsRiskyContribModel.py @@ -52,13 +52,13 @@ def test_finite_cont_share(self): # Independent solver fin_cont_agent.solve() self.assertAlmostEqual( - fin_cont_agent.solution[0].stage_sols["Reb"].dfracFunc_Adj(3, 4), -0.87671241 + fin_cont_agent.solution[0].stage_sols["Reb"].dfracFunc_Adj(3., 4.), -0.87671241 ) self.assertAlmostEqual( - fin_cont_agent.solution[0].stage_sols["Sha"].ShareFunc_Adj(5, 0.1), 0.14641409 + fin_cont_agent.solution[0].stage_sols["Sha"].ShareFunc_Adj(5., 0.1), 0.14641409 ) self.assertAlmostEqual( - fin_cont_agent.solution[0].stage_sols["Cns"].cFunc(3, 4, 0.1), 2.4560881 + fin_cont_agent.solution[0].stage_sols["Cns"].cFunc(3., 4., 0.1), 2.4560881 ) # General correlated solver @@ -86,13 +86,13 @@ def test_finite_disc_share(self): fin_disc_agent.solve() self.assertAlmostEqual( - fin_disc_agent.solution[0].stage_sols["Reb"].dfracFunc_Adj(3, 4), -0.8767603 + fin_disc_agent.solution[0].stage_sols["Reb"].dfracFunc_Adj(3., 4.), -0.8767603 ) self.assertAlmostEqual( - fin_disc_agent.solution[0].stage_sols["Sha"].ShareFunc_Adj(5, 0.1), 0.1 + fin_disc_agent.solution[0].stage_sols["Sha"].ShareFunc_Adj(5., 0.1), 0.1 ) self.assertAlmostEqual( - fin_disc_agent.solution[0].stage_sols["Cns"].cFunc(3, 4, 0.1), 2.45608803 + fin_disc_agent.solution[0].stage_sols["Cns"].cFunc(3., 4., 0.1), 2.45608803 ) # General correlated solver