Skip to content

Commit 55331c5

Browse files
committed
Remove redundant filterwarnings mark
pytest is configured with the same behavior globally
1 parent ddba171 commit 55331c5

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

tests/model/test_marginal_model.py

-11
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ def disaster_model():
5353
return disaster_model, years
5454

5555

56-
@pytest.mark.filterwarnings("error")
5756
def test_marginalized_bernoulli_logp():
5857
"""Test logp of IR TestFiniteMarginalDiscreteRV directly"""
5958
mu = pt.vector("mu")
@@ -83,7 +82,6 @@ def test_marginalized_bernoulli_logp():
8382
)
8483

8584

86-
@pytest.mark.filterwarnings("error")
8785
def test_marginalized_basic():
8886
data = [2] * 5
8987

@@ -128,7 +126,6 @@ def test_marginalized_basic():
128126
)
129127

130128

131-
@pytest.mark.filterwarnings("error")
132129
def test_multiple_independent_marginalized_rvs():
133130
with MarginalModel() as m:
134131
sigma = pm.HalfNormal("sigma")
@@ -155,7 +152,6 @@ def test_multiple_independent_marginalized_rvs():
155152
np.testing.assert_array_almost_equal(y_logp, y_ref_logp)
156153

157154

158-
@pytest.mark.filterwarnings("error")
159155
def test_multiple_dependent_marginalized_rvs():
160156
"""Test that marginalization works when there is more than one dependent RV"""
161157
with MarginalModel() as m:
@@ -194,7 +190,6 @@ def test_rv_dependent_multiple_marginalized_rvs():
194190
np.testing.assert_allclose(np.exp(logp({"z": 2})), 0.1 * 0.3)
195191

196192

197-
@pytest.mark.filterwarnings("error")
198193
def test_nested_marginalized_rvs():
199194
"""Test that marginalization works when there are nested marginalized RVs"""
200195

@@ -232,7 +227,6 @@ def test_nested_marginalized_rvs():
232227
)
233228

234229

235-
@pytest.mark.filterwarnings("error")
236230
def test_marginalized_change_point_model(disaster_model):
237231
m, years = disaster_model
238232

@@ -251,7 +245,6 @@ def test_marginalized_change_point_model(disaster_model):
251245

252246

253247
@pytest.mark.slow
254-
@pytest.mark.filterwarnings("error")
255248
def test_marginalized_change_point_model_sampling(disaster_model):
256249
m, _ = disaster_model
257250

@@ -435,7 +428,6 @@ def true_sub_idx_logp(y):
435428
np.testing.assert_almost_equal(logsumexp(post.lp_sub_idx, axis=-1), 0)
436429

437430

438-
@pytest.mark.filterwarnings("error")
439431
def test_not_supported_marginalized():
440432
"""Marginalized graphs with non-Elemwise Operations are not supported as they
441433
would violate the batching logp assumption"""
@@ -484,7 +476,6 @@ def test_not_supported_marginalized():
484476
m.marginalize(x)
485477

486478

487-
@pytest.mark.filterwarnings("error")
488479
def test_marginalized_deterministic_and_potential():
489480
rng = np.random.default_rng(299)
490481

@@ -510,7 +501,6 @@ def test_marginalized_deterministic_and_potential():
510501
assert pot_value.eval({y_value: 2, z_value: 5}) == 8
511502

512503

513-
@pytest.mark.filterwarnings("error")
514504
def test_not_supported_marginalized_deterministic_and_potential():
515505
with MarginalModel() as m:
516506
x = pm.Bernoulli("x", p=0.7)
@@ -533,7 +523,6 @@ def test_not_supported_marginalized_deterministic_and_potential():
533523
m.marginalize([x])
534524

535525

536-
@pytest.mark.filterwarnings("error")
537526
@pytest.mark.parametrize(
538527
"transform, expected_warning",
539528
(

0 commit comments

Comments
 (0)