@@ -332,8 +332,10 @@ def test_multi_proc(self):
332332 with LogCapture () as log :
333333 logging .getLogger ()
334334 logistic_model .sample (
335- data = logistic_data , chains = 4 , parallel_chains = 1 ,
336- show_progress = False
335+ data = logistic_data ,
336+ chains = 4 ,
337+ parallel_chains = 1 ,
338+ show_progress = False ,
337339 )
338340 log .check_present (
339341 ('cmdstanpy' , 'INFO' , 'finish chain 1' ),
@@ -342,8 +344,10 @@ def test_multi_proc(self):
342344 with LogCapture () as log :
343345 logging .getLogger ()
344346 logistic_model .sample (
345- data = logistic_data , chains = 4 , parallel_chains = 2 ,
346- show_progress = False
347+ data = logistic_data ,
348+ chains = 4 ,
349+ parallel_chains = 2 ,
350+ show_progress = False ,
347351 )
348352 if cpu_count () >= 4 :
349353 # finish chains 1, 2 before starting chains 3, 4
@@ -355,8 +359,10 @@ def test_multi_proc(self):
355359 with LogCapture () as log :
356360 logging .getLogger ()
357361 logistic_model .sample (
358- data = logistic_data , chains = 4 , parallel_chains = 4 ,
359- show_progress = False
362+ data = logistic_data ,
363+ chains = 4 ,
364+ parallel_chains = 4 ,
365+ show_progress = False ,
360366 )
361367 log .check_present (
362368 ('cmdstanpy' , 'INFO' , 'start chain 4' ),
@@ -370,7 +376,7 @@ def test_multi_proc(self):
370376 chains = 1 ,
371377 parallel_chains = 1 ,
372378 threads_per_chain = 7 ,
373- show_progress = False
379+ show_progress = False ,
374380 )
375381 log .check_present (('cmdstanpy' , 'DEBUG' , 'total threads: 7' ))
376382 with LogCapture () as log :
@@ -380,7 +386,7 @@ def test_multi_proc(self):
380386 chains = 7 ,
381387 parallel_chains = 1 ,
382388 threads_per_chain = 5 ,
383- show_progress = False
389+ show_progress = False ,
384390 )
385391 log .check_present (('cmdstanpy' , 'DEBUG' , 'total threads: 5' ))
386392 with LogCapture () as log :
@@ -581,13 +587,10 @@ def test_show_progress(self, stanfile='bernoulli.stan'):
581587 bern_model = CmdStanModel (stan_file = stan )
582588 jdata = os .path .join (DATAFILES_PATH , 'bernoulli.data.json' )
583589
584- sys_stderr = io .StringIO () # tqdm prints to stderr
590+ sys_stderr = io .StringIO () # tqdm prints to stderr
585591 with contextlib .redirect_stderr (sys_stderr ):
586592 bern_model .sample (
587- data = jdata ,
588- chains = 2 ,
589- parallel_chains = 2 ,
590- show_progress = True
593+ data = jdata , chains = 2 , parallel_chains = 2 , show_progress = True
591594 )
592595 console = sys_stderr .getvalue ()
593596 self .assertTrue ('chain 1' in console )
0 commit comments