Example #1
0
 def test_bad_init(self):
     with Model():
         HalfNormal('a', sd=1, testval=-1, transform=None)
         with pytest.raises(ValueError) as error:
             sample(init=None)
         error.match('Bad initial')
Example #2
0
 def test_bad_init_parallel(self):
     with Model():
         HalfNormal("a", sigma=1, testval=-1, transform=None)
         with pytest.raises(ParallelSamplingError) as error:
             sample(init=None, cores=2, random_seed=1)
         error.match("Bad initial")