Skip to content

Commit 0549f93

Browse files
committed
Remove stale/redundant random tests
1 parent 82dc0f5 commit 0549f93

File tree

2 files changed

+0
-47
lines changed

2 files changed

+0
-47
lines changed

pymc/tests/test_distributions.py

-35
Original file line numberDiff line numberDiff line change
@@ -2134,14 +2134,6 @@ def test_dirichlet_vectorized(self, a, size):
21342134
err_msg=f"vals={vals}",
21352135
)
21362136

2137-
def test_dirichlet_shape(self):
2138-
a = at.as_tensor_variable(np.r_[1, 2])
2139-
dir_rv = Dirichlet.dist(a)
2140-
assert dir_rv.shape.eval() == (2,)
2141-
2142-
with pytest.warns(DeprecationWarning), aesara.change_flags(compute_test_value="ignore"):
2143-
dir_rv = Dirichlet.dist(at.vector())
2144-
21452137
@pytest.mark.parametrize("n", [2, 3])
21462138
def test_multinomial(self, n):
21472139
self.check_logp(
@@ -2151,33 +2143,6 @@ def test_multinomial(self, n):
21512143
lambda value, n, p: scipy.stats.multinomial.logpmf(value, n, p),
21522144
)
21532145

2154-
@pytest.mark.parametrize(
2155-
"p, size, n",
2156-
[
2157-
[[0.25, 0.25, 0.25, 0.25], (4,), 2],
2158-
[[0.25, 0.25, 0.25, 0.25], (1, 4), 3],
2159-
# 3: expect to fail
2160-
# [[.25, .25, .25, .25], (10, 4)],
2161-
[[0.25, 0.25, 0.25, 0.25], (10, 1, 4), 5],
2162-
# 5: expect to fail
2163-
# [[[.25, .25, .25, .25]], (2, 4), [7, 11]],
2164-
[[[0.25, 0.25, 0.25, 0.25], [0.25, 0.25, 0.25, 0.25]], (2, 4), 13],
2165-
[[[0.25, 0.25, 0.25, 0.25], [0.25, 0.25, 0.25, 0.25]], (1, 2, 4), [23, 29]],
2166-
[
2167-
[[0.25, 0.25, 0.25, 0.25], [0.25, 0.25, 0.25, 0.25]],
2168-
(10, 2, 4),
2169-
[31, 37],
2170-
],
2171-
[[[0.25, 0.25, 0.25, 0.25], [0.25, 0.25, 0.25, 0.25]], (2, 4), [17, 19]],
2172-
],
2173-
)
2174-
def test_multinomial_random(self, p, size, n):
2175-
p = np.asarray(p)
2176-
with Model() as model:
2177-
m = Multinomial("m", n=n, p=p, size=size)
2178-
2179-
assert m.eval().shape == size + p.shape
2180-
21812146
@pytest.mark.parametrize("n", [(10), ([10, 11]), ([[5, 6], [10, 11]])])
21822147
@pytest.mark.parametrize(
21832148
"p",

pymc/tests/test_distributions_random.py

-12
Original file line numberDiff line numberDiff line change
@@ -255,18 +255,6 @@ class TestGaussianRandomWalk(BaseTestCases.BaseTestCase):
255255
default_shape = (1,)
256256

257257

258-
@pytest.mark.xfail(reason="This distribution has not been refactored for v4")
259-
class TestZeroInflatedNegativeBinomial(BaseTestCases.BaseTestCase):
260-
distribution = pm.ZeroInflatedNegativeBinomial
261-
params = {"mu": 1.0, "alpha": 1.0, "psi": 0.3}
262-
263-
264-
@pytest.mark.xfail(reason="This distribution has not been refactored for v4")
265-
class TestZeroInflatedBinomial(BaseTestCases.BaseTestCase):
266-
distribution = pm.ZeroInflatedBinomial
267-
params = {"n": 10, "p": 0.6, "psi": 0.3}
268-
269-
270258
class BaseTestDistribution(SeededTest):
271259
"""
272260
This class provides a base for tests that new RandomVariables are correctly

0 commit comments

Comments
 (0)