File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -125,15 +125,19 @@ def test_idata_property():
125
125
assert isinstance (result .idata , az .InferenceData )
126
126
127
127
128
- def test_result_reproducibility ():
128
+ seeds = [1234 , 42 , 123456789 ]
129
+
130
+
131
+ @pytest .mark .parametrize ("seed" , seeds )
132
+ def test_result_reproducibility (seed ):
129
133
"""Test that we can reproduce the results from the model. We could in theory test
130
134
this with all the model and experiment types, but what is being targetted is
131
135
the ModelBuilder.fit method, so we should be safe testing with just one model. Here
132
136
we use the DifferenceInDifferences experiment class."""
133
137
# Load the data
134
138
df = cp .load_data ("did" )
135
139
# Set a random seed
136
- sample_kwargs ["random_seed" ] = 42
140
+ sample_kwargs ["random_seed" ] = seed
137
141
# Calculate the result twice
138
142
result1 = cp .pymc_experiments .DifferenceInDifferences (
139
143
df ,
You can’t perform that action at this time.
0 commit comments