Skip to content

Commit beb6224

Browse files
committed
adapt test
1 parent 4c67f6f commit beb6224

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

tests/test_model_builder.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1019,7 +1019,7 @@ def test_fit_sampler_config_seed_reproducibility(toy_X, toy_y) -> None:
10191019
assert idata.posterior.equals(idata2.posterior)
10201020

10211021

1022-
def test_fit_sampler_config_with_rng_fails(toy_X, toy_y, mock_pymc_sample) -> None:
1022+
def test_fit_sampler_config_with_rng(toy_X, toy_y, mock_pymc_sample) -> None:
10231023
sampler_config = {
10241024
"chains": 1,
10251025
"draws": 10,
@@ -1028,9 +1028,8 @@ def test_fit_sampler_config_with_rng_fails(toy_X, toy_y, mock_pymc_sample) -> No
10281028
}
10291029
model = RegressionModelBuilderTest(sampler_config=sampler_config)
10301030

1031-
match = r"Object of type Generator is not JSON serializable"
1032-
with pytest.raises(TypeError, match=match):
1033-
model.fit(toy_X, toy_y)
1031+
idata = model.fit(toy_X, toy_y)
1032+
assert isinstance(idata, az.InferenceData)
10341033

10351034

10361035
def test_unmatched_index(toy_X, toy_y) -> None:

0 commit comments

Comments
 (0)