Skip to content

Commit 4a21624

Browse files
ColCarrolltwiecki
authored andcommitted
Make diagnostic tests reproducible (#1451)
1 parent 100dbb1 commit 4a21624

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

pymc3/tests/test_diagnostics.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
import unittest
2-
31
import numpy as np
42
from numpy.testing import assert_allclose, assert_array_less
53

4+
from .helpers import SeededTest
65
from ..model import Model
76
from ..step_methods import Slice, Metropolis, NUTS
87
from ..distributions import Normal
@@ -12,7 +11,7 @@
1211
from .test_examples import build_disaster_model
1312

1413

15-
class TestGelmanRubin(unittest.TestCase):
14+
class TestGelmanRubin(SeededTest):
1615
good_ratio = 1.1
1716

1817
def get_ptrace(self, n_samples):
@@ -85,7 +84,7 @@ def test_right_shape_scalar_one(self):
8584
self.test_right_shape_python_float(shape=1, test_shape=(1,))
8685

8786

88-
class TestDiagnostics(unittest.TestCase):
87+
class TestDiagnostics(SeededTest):
8988

9089
def get_switchpoint(self, n_samples):
9190
model = build_disaster_model()

0 commit comments

Comments
 (0)