From 102417d8d05859c88d90093b17855a8dddc983e3 Mon Sep 17 00:00:00 2001 From: colin Date: Thu, 13 Oct 2016 20:17:31 -0400 Subject: [PATCH] Make diagnostic tests reproducible --- pymc3/tests/test_diagnostics.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pymc3/tests/test_diagnostics.py b/pymc3/tests/test_diagnostics.py index a5864288f6..bc72594154 100644 --- a/pymc3/tests/test_diagnostics.py +++ b/pymc3/tests/test_diagnostics.py @@ -1,8 +1,7 @@ -import unittest - import numpy as np from numpy.testing import assert_allclose, assert_array_less +from .helpers import SeededTest from ..model import Model from ..step_methods import Slice, Metropolis, NUTS from ..distributions import Normal @@ -12,7 +11,7 @@ from .test_examples import build_disaster_model -class TestGelmanRubin(unittest.TestCase): +class TestGelmanRubin(SeededTest): good_ratio = 1.1 def get_ptrace(self, n_samples): @@ -85,7 +84,7 @@ def test_right_shape_scalar_one(self): self.test_right_shape_python_float(shape=1, test_shape=(1,)) -class TestDiagnostics(unittest.TestCase): +class TestDiagnostics(SeededTest): def get_switchpoint(self, n_samples): model = build_disaster_model()