Removed magic numbers from plotting test
@@ -73,13 +73,7 @@ def test_sample_with_plot(net: BayesNet) -> None:
assert len(ax) == 3
assert all(len(ax[i][0].get_lines()) == 1 for i in range(3))
-
- assert np.allclose(ax[0][0].get_lines()[0].get_ydata(),
- [0.49147822, 0.49147822, 0.49147822, 0.20033212, 0.20033212])
- assert np.allclose(ax[1][0].get_lines()[0].get_ydata(),
- [0.87268333, 1.10409369, 1.10409369, 1.10409369, 0.69098161])
- assert np.allclose(ax[2][0].get_lines()[0].get_ydata(),
- [-14.46166855, -14.46166855, 0.32305686, 0.32305686, 0.32305686])
+ assert all(len(ax[i][0].get_lines()[0].get_ydata()) == 5 for i in range(5))
def test_can_specify_a_gaussian_proposal_distribution(net: BayesNet) -> None:
