Skip to content
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

Duplicated assert in test_independent unit test #1251

Closed
matthewfeickert opened this issue Jan 13, 2021 · 0 comments · Fixed by #1252
Closed

Duplicated assert in test_independent unit test #1251

matthewfeickert opened this issue Jan 13, 2021 · 0 comments · Fixed by #1252
Assignees
Labels
good first issue Good for newcomers tests pytest

Comments

@matthewfeickert
Copy link
Member

matthewfeickert commented Jan 13, 2021

Description

There is a duplicated assert that doesn't need to be here

def test_independent(backend):
tb, _ = backend
result = probability.Independent(
probability.Poisson(tb.astensor([10.0, 10.0]))
).log_prob(tb.astensor([2.0, 3.0]))
p1 = probability.Poisson(tb.astensor([10.0])).log_prob(tb.astensor(2.0))
p2 = probability.Poisson(tb.astensor([10.0])).log_prob(tb.astensor(3.0))
assert tb.tolist(probability.Simultaneous._joint_logpdf([p1, p2]))[0] == tb.tolist(
result
)
assert tb.tolist(probability.Simultaneous._joint_logpdf([p1, p2]))[0] == tb.tolist(
result
)

Just the first assert is needed.

This was first noticed by @kratsg in PR #1232

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers tests pytest
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant