Skip to content

Commit

Permalink
adding test for #1379 and fixing test that depends on simulated targe…
Browse files Browse the repository at this point in the history
…t value
  • Loading branch information
sbenthall committed Feb 7, 2024
1 parent 8fac4a2 commit 3a2b560
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion HARK/ConsumptionSaving/tests/test_IndShockConsumerType.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,12 @@ def test_simulated_values(self):
# simulation test -- seed/generator specific
# self.assertAlmostEqual(self.agent.state_now["aLvl"][1], 0.18438, place = HARK_PRECISION)

def test_income_dist_random_seeds(self):
a1 = IndShockConsumerType(seed = 1000)
a2 = IndShockConsumerType(seed = 200)

self.assertFalse(a1.PermShkDstn.seed == a2.PermShkDstn.seed)


class testBufferStock(unittest.TestCase):
"""Tests of the results of the BufferStock REMARK."""
Expand Down Expand Up @@ -414,7 +420,7 @@ def test_cyclical(self):
CyclicalExample.simulate()

self.assertAlmostEqual(
CyclicalExample.state_now["aLvl"][1], 2.41243, places=HARK_PRECISION
CyclicalExample.state_now["aLvl"][1], 3.32431, places=HARK_PRECISION
)


Expand Down

0 comments on commit 3a2b560

Please sign in to comment.