Skip to content

Commit

Permalink
Merge pull request #802 from sbenthall/sb-pref-tests
Browse files Browse the repository at this point in the history
adding simulation tests on consumption  for ConsPrefShockModel
  • Loading branch information
sbenthall authored Aug 19, 2020
2 parents fe8ebdb + 547608c commit 64a2b04
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 64a2b04

Please sign in to comment.