Skip to content

Commit 72e9c5c

Browse files
committed
Fix sample test that didn't like threads being enabled
1 parent c0338c9 commit 72e9c5c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/test_sample.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
)
5656
def test_bernoulli_good(stanfile: str):
5757
stan = os.path.join(DATAFILES_PATH, stanfile)
58-
bern_model = CmdStanModel(stan_file=stan)
58+
bern_model = CmdStanModel(stan_file=stan, force_compile=True)
5959

6060
jdata = os.path.join(DATAFILES_PATH, 'bernoulli.data.json')
6161
bern_fit = bern_model.sample(
@@ -74,6 +74,7 @@ def test_bernoulli_good(stanfile: str):
7474

7575
for i in range(bern_fit.runset.chains):
7676
csv_file = bern_fit.runset.csv_files[i]
77+
# NB this assumes we're not using threads for chains
7778
stdout_file = bern_fit.runset.stdout_files[i]
7879
assert os.path.exists(csv_file)
7980
assert os.path.exists(stdout_file)

0 commit comments

Comments
 (0)