def test_prior(self): r = Relationship(utils.straight_line, TEST_X, TEST_Y) priors = r.prior() assert_equal(len(priors), 2) assert_equal( isinstance(priors[0], scipy.stats._distn_infrastructure.rv_frozen), True) assert_equal( isinstance(priors[1], scipy.stats._distn_infrastructure.rv_frozen), True) assert_equal(priors[0].interval(1), [-9, 11]) assert_equal(priors[1].interval(1), [-9, 11])
def test_prior_with_bounds(self): r = Relationship(utils.straight_line, TEST_X, TEST_Y, bounds=((0, 10), (-1, 1))) priors = r.prior() assert_equal(len(priors), 2) assert_equal( isinstance(priors[0], scipy.stats._distn_infrastructure.rv_frozen), True) assert_equal( isinstance(priors[1], scipy.stats._distn_infrastructure.rv_frozen), True) assert_equal(priors[0].interval(1), [0, 10]) assert_equal(priors[1].interval(1), [-1, 1])