Skip to content

Commit

Permalink
adding simulation tests on consumption for ConsPrefShockModel
Browse files Browse the repository at this point in the history
  • Loading branch information
sbenthall committed Aug 18, 2020
1 parent fe8ebdb commit 547608c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions HARK/ConsumptionSaving/tests/test_ConsPrefShockModel.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ def test_simulation(self):
self.agent.initializeSim()
self.agent.simulate()

self.assertAlmostEqual(
self.agent.history['cNrmNow'][0][5],
1.21699840367737
)

class testKinkyPrefConsumerType(unittest.TestCase):

def setUp(self):
Expand Down Expand Up @@ -72,3 +77,8 @@ def test_simulation(self):
self.agent.track_vars = ["cNrmNow", "PrefShkNow"]
self.agent.initializeSim()
self.agent.simulate()

self.assertAlmostEqual(
self.agent.history['cNrmNow'][0][5],
1.3282880084862532
)

0 comments on commit 547608c

Please sign in to comment.