@@ -16,6 +16,7 @@ def assert_sample_mean(samples, expected_mean):
1616 assert np .abs (expected_mean - samples .mean ()) < 4 * std_dev
1717
1818
19+ @pytest .mark .flaky (reruns = 1 )
1920def test_discrete ():
2021 x = [0.0 , 1.0 , 10.0 ]
2122 p = [0.3 , 0.2 , 0.5 ]
@@ -104,6 +105,7 @@ def test_clip_discrete():
104105 d .clip (5 )
105106
106107
108+ @pytest .mark .flaky (reruns = 1 )
107109def test_uniform ():
108110 a , b = 10.0 , 20.0
109111 d = openmc .stats .Uniform (a , b )
@@ -127,6 +129,7 @@ def test_uniform():
127129 assert_sample_mean (samples , exp_mean )
128130
129131
132+ @pytest .mark .flaky (reruns = 1 )
130133def test_powerlaw ():
131134 a , b , n = 10.0 , 100.0 , 2.0
132135 d = openmc .stats .PowerLaw (a , b , n )
@@ -148,6 +151,7 @@ def test_powerlaw():
148151 assert_sample_mean (samples , exp_mean )
149152
150153
154+ @pytest .mark .flaky (reruns = 1 )
151155def test_maxwell ():
152156 theta = 1.2895e6
153157 d = openmc .stats .Maxwell (theta )
@@ -171,6 +175,7 @@ def test_maxwell():
171175 assert samples_2 .mean () != samples .mean ()
172176
173177
178+ @pytest .mark .flaky (reruns = 1 )
174179def test_watt ():
175180 a , b = 0.965e6 , 2.29e-6
176181 d = openmc .stats .Watt (a , b )
@@ -194,6 +199,7 @@ def test_watt():
194199 assert_sample_mean (samples , exp_mean )
195200
196201
202+ @pytest .mark .flaky (reruns = 1 )
197203def test_tabular ():
198204 # test linear-linear sampling
199205 x = np .array ([0.0 , 5.0 , 7.0 , 10.0 ])
@@ -270,6 +276,7 @@ def test_legendre():
270276 d .to_xml_element ('distribution' )
271277
272278
279+ @pytest .mark .flaky (reruns = 1 )
273280def test_mixture ():
274281 d1 = openmc .stats .Uniform (0 , 5 )
275282 d2 = openmc .stats .Uniform (3 , 7 )
@@ -425,6 +432,7 @@ def test_point():
425432 assert d .xyz == pytest .approx (p )
426433
427434
435+ @pytest .mark .flaky (reruns = 1 )
428436def test_normal ():
429437 mean = 10.0
430438 std_dev = 2.0
@@ -444,6 +452,7 @@ def test_normal():
444452 assert_sample_mean (samples , mean )
445453
446454
455+ @pytest .mark .flaky (reruns = 1 )
447456def test_muir ():
448457 mean = 10.0
449458 mass = 5.0
@@ -463,6 +472,7 @@ def test_muir():
463472 assert_sample_mean (samples , mean )
464473
465474
475+ @pytest .mark .flaky (reruns = 1 )
466476def test_combine_distributions ():
467477 # Combine two discrete (same data as in test_merge_discrete)
468478 x1 = [0.0 , 1.0 , 10.0 ]
0 commit comments