Skip to content

Commit

Permalink
Update tests to include optimize result
Browse files Browse the repository at this point in the history
  • Loading branch information
timmens committed Mar 27, 2024
1 parent 9b6cb0d commit d19e732
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/estimation/test_estimate_msm.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import numpy as np
import pandas as pd
import pytest
from estimagic.optimization.optimize_result import OptimizeResult
from estimagic.estimation.estimate_msm import estimate_msm
from estimagic.shared.check_option_dicts import (
check_numdiff_options,
Expand Down Expand Up @@ -64,6 +65,9 @@ def test_estimate_msm(simulate_moments, moments_cov, optimize_options):
# check that minimization works
aaae(calculated.params, expected_params)

# assert that optimization result exists and is of correct type
assert isinstance(calculated.optimize_result, OptimizeResult)

# check that cov works
calculated_cov = calculated.cov()
if isinstance(calculated_cov, pd.DataFrame):
Expand Down

0 comments on commit d19e732

Please sign in to comment.