Skip to content

Removed xfail mark while testing mvnormal random #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 18, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 4 additions & 11 deletions pymc3/tests/test_distributions_random.py
Original file line number Diff line number Diff line change
Expand Up @@ -1571,7 +1571,7 @@ def test_Triangular(
assert prior["target"].shape == (prior_samples,) + shape


def generate_shapes(include_params=False, xfail=False):
def generate_shapes(include_params=False):
# fmt: off
mudim_as_event = [
[None, 1, 3, 10, (10, 3), 100],
Expand All @@ -1590,20 +1590,13 @@ def generate_shapes(include_params=False, xfail=False):
del mudim_as_event[-1]
del mudim_as_dist[-1]
data = itertools.chain(itertools.product(*mudim_as_event), itertools.product(*mudim_as_dist))
if xfail:
data = list(data)
for index in range(len(data)):
if data[index][0] in (None, 1):
data[index] = pytest.param(
*data[index], marks=pytest.mark.xfail(reason="wait for PR #4214")
)
return data


class TestMvNormal(SeededTest):
@pytest.mark.parametrize(
["sample_shape", "dist_shape", "mu_shape", "param"],
generate_shapes(include_params=True, xfail=False),
generate_shapes(include_params=True),
ids=str,
)
def test_with_np_arrays(self, sample_shape, dist_shape, mu_shape, param):
Expand All @@ -1613,7 +1606,7 @@ def test_with_np_arrays(self, sample_shape, dist_shape, mu_shape, param):

@pytest.mark.parametrize(
["sample_shape", "dist_shape", "mu_shape"],
generate_shapes(include_params=False, xfail=True),
generate_shapes(include_params=False),
ids=str,
)
def test_with_chol_rv(self, sample_shape, dist_shape, mu_shape):
Expand All @@ -1630,7 +1623,7 @@ def test_with_chol_rv(self, sample_shape, dist_shape, mu_shape):

@pytest.mark.parametrize(
["sample_shape", "dist_shape", "mu_shape"],
generate_shapes(include_params=False, xfail=True),
generate_shapes(include_params=False),
ids=str,
)
def test_with_cov_rv(self, sample_shape, dist_shape, mu_shape):
Expand Down