Skip to content

Commit

Permalink
Fix warnings in test_bootstrap_existing_outcomes by changing test input
Browse files Browse the repository at this point in the history
  • Loading branch information
timmens committed Jan 21, 2025
1 parent 6ffb451 commit bf9abd9
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions tests/estimagic/test_bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,18 +123,16 @@ def test_bootstrap_existing_outcomes(setup):
result = bootstrap(
data=setup["df"],
outcome=_outcome_func,
n_draws=3,
)
assert len(result.outcomes) == 3
result = bootstrap(
outcome=_outcome_func,
data=setup["df"],
existing_result=result,
n_draws=2,
)
assert len(result.outcomes) == 2
with pytest.warns(RuntimeWarning):
# As there is only one draw, multiple warnings are raised that can be ignored
result = bootstrap(
outcome=_outcome_func,
data=setup["df"],
existing_result=result,
n_draws=1,
)
assert len(result.outcomes) == 1


def test_bootstrap_from_outcomes(setup, expected):
Expand Down

0 comments on commit bf9abd9

Please sign in to comment.