Skip to content
This repository was archived by the owner on Mar 19, 2021. It is now read-only.

Commit 93dd807

Browse files
author
ariddell
committed
Align stanc test with new error message
1 parent c38ba7c commit 93dd807

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pystan/tests/test_stanc.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,10 @@ def test_stanc(self):
1717
def test_stanc_exception(self):
1818
model_code = 'parameters {real z;} model {z ~ no_such_distribution();}'
1919
assertRaisesRegex = self.assertRaisesRegexp if PY2 else self.assertRaisesRegex
20-
with assertRaisesRegex(ValueError, 'Distribution .* not found\.'):
20+
# distribution not found error
21+
with assertRaisesRegex(ValueError, r'Probability function must end in _lpdf or _lpmf\. Found'):
2122
stanc(model_code=model_code)
22-
with assertRaisesRegex(ValueError, 'Distribution .* not found\.'):
23+
with assertRaisesRegex(ValueError, r'Probability function must end in _lpdf or _lpmf\. Found'):
2324
StanModel(model_code=model_code)
2425

2526
def test_stanc_exception_semicolon(self):

0 commit comments

Comments
 (0)