Skip to content

Commit

Permalink
Remove stale/redundant random tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardoV94 committed Dec 2, 2021
1 parent b97dd3e commit 57468f6
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 39 deletions.
27 changes: 0 additions & 27 deletions pymc/tests/test_distributions.py
Original file line number Diff line number Diff line change
Expand Up @@ -2169,33 +2169,6 @@ def test_multinomial_logp(self, n):
Multinomial, Vector(Nat, n), {"p": Simplex(n), "n": Nat}, multinomial_logpmf
)

@pytest.mark.parametrize(
"p, size, n",
[
[[0.25, 0.25, 0.25, 0.25], (4,), 2],
[[0.25, 0.25, 0.25, 0.25], (1, 4), 3],
# 3: expect to fail
# [[.25, .25, .25, .25], (10, 4)],
[[0.25, 0.25, 0.25, 0.25], (10, 1, 4), 5],
# 5: expect to fail
# [[[.25, .25, .25, .25]], (2, 4), [7, 11]],
[[[0.25, 0.25, 0.25, 0.25], [0.25, 0.25, 0.25, 0.25]], (2, 4), 13],
[[[0.25, 0.25, 0.25, 0.25], [0.25, 0.25, 0.25, 0.25]], (1, 2, 4), [23, 29]],
[
[[0.25, 0.25, 0.25, 0.25], [0.25, 0.25, 0.25, 0.25]],
(10, 2, 4),
[31, 37],
],
[[[0.25, 0.25, 0.25, 0.25], [0.25, 0.25, 0.25, 0.25]], (2, 4), [17, 19]],
],
)
def test_multinomial_random(self, p, size, n):
p = np.asarray(p)
with Model() as model:
m = Multinomial("m", n=n, p=p, size=size)

assert m.eval().shape == size + p.shape

@pytest.mark.parametrize("n", [(10), ([10, 11]), ([[5, 6], [10, 11]])])
@pytest.mark.parametrize(
"p",
Expand Down
12 changes: 0 additions & 12 deletions pymc/tests/test_distributions_random.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,18 +255,6 @@ class TestGaussianRandomWalk(BaseTestCases.BaseTestCase):
default_shape = (1,)


@pytest.mark.xfail(reason="This distribution has not been refactored for v4")
class TestZeroInflatedNegativeBinomial(BaseTestCases.BaseTestCase):
distribution = pm.ZeroInflatedNegativeBinomial
params = {"mu": 1.0, "alpha": 1.0, "psi": 0.3}


@pytest.mark.xfail(reason="This distribution has not been refactored for v4")
class TestZeroInflatedBinomial(BaseTestCases.BaseTestCase):
distribution = pm.ZeroInflatedBinomial
params = {"n": 10, "p": 0.6, "psi": 0.3}


class BaseTestDistribution(SeededTest):
"""
This class provides a base for tests that new RandomVariables are correctly
Expand Down

0 comments on commit 57468f6

Please sign in to comment.