Skip to content

Commit 50afbd6

Browse files
committed
Remove redundant filterwarnings mark
pytest is configured with the same behavior globally
1 parent 32bc557 commit 50afbd6

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

pymc_experimental/tests/model/test_marginal_model.py

-11
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ def disaster_model():
4747
return disaster_model, years
4848

4949

50-
@pytest.mark.filterwarnings("error")
5150
def test_marginalized_bernoulli_logp():
5251
"""Test logp of IR TestFiniteMarginalDiscreteRV directly"""
5352
mu = pt.vector("mu")
@@ -77,7 +76,6 @@ def test_marginalized_bernoulli_logp():
7776
)
7877

7978

80-
@pytest.mark.filterwarnings("error")
8179
def test_marginalized_basic():
8280
data = [2] * 5
8381

@@ -122,7 +120,6 @@ def test_marginalized_basic():
122120
)
123121

124122

125-
@pytest.mark.filterwarnings("error")
126123
def test_multiple_independent_marginalized_rvs():
127124
with MarginalModel() as m:
128125
sigma = pm.HalfNormal("sigma")
@@ -149,7 +146,6 @@ def test_multiple_independent_marginalized_rvs():
149146
np.testing.assert_array_almost_equal(y_logp, y_ref_logp)
150147

151148

152-
@pytest.mark.filterwarnings("error")
153149
def test_multiple_dependent_marginalized_rvs():
154150
"""Test that marginalization works when there is more than one dependent RV"""
155151
with MarginalModel() as m:
@@ -188,7 +184,6 @@ def test_rv_dependent_multiple_marginalized_rvs():
188184
np.testing.assert_allclose(np.exp(logp({"z": 2})), 0.1 * 0.3)
189185

190186

191-
@pytest.mark.filterwarnings("error")
192187
def test_nested_marginalized_rvs():
193188
"""Test that marginalization works when there are nested marginalized RVs"""
194189

@@ -226,7 +221,6 @@ def test_nested_marginalized_rvs():
226221
)
227222

228223

229-
@pytest.mark.filterwarnings("error")
230224
def test_marginalized_change_point_model(disaster_model):
231225
m, years = disaster_model
232226

@@ -245,7 +239,6 @@ def test_marginalized_change_point_model(disaster_model):
245239

246240

247241
@pytest.mark.slow
248-
@pytest.mark.filterwarnings("error")
249242
def test_marginalized_change_point_model_sampling(disaster_model):
250243
m, _ = disaster_model
251244

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

430423

431-
@pytest.mark.filterwarnings("error")
432424
def test_not_supported_marginalized():
433425
"""Marginalized graphs with non-Elemwise Operations are not supported as they
434426
would violate the batching logp assumption"""
@@ -477,7 +469,6 @@ def test_not_supported_marginalized():
477469
m.marginalize(x)
478470

479471

480-
@pytest.mark.filterwarnings("error")
481472
def test_marginalized_deterministic_and_potential():
482473
rng = np.random.default_rng(299)
483474

@@ -503,7 +494,6 @@ def test_marginalized_deterministic_and_potential():
503494
assert pot_value.eval({y_value: 2, z_value: 5}) == 8
504495

505496

506-
@pytest.mark.filterwarnings("error")
507497
def test_not_supported_marginalized_deterministic_and_potential():
508498
with MarginalModel() as m:
509499
x = pm.Bernoulli("x", p=0.7)
@@ -526,7 +516,6 @@ def test_not_supported_marginalized_deterministic_and_potential():
526516
m.marginalize([x])
527517

528518

529-
@pytest.mark.filterwarnings("error")
530519
@pytest.mark.parametrize(
531520
"transform, expected_warning",
532521
(

0 commit comments

Comments
 (0)