Skip to content

Commit c595ce2

Browse files
committed
Fix parallel stellar evo test broken by 279a069
1 parent d77c113 commit c595ce2

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

src/tests/ext_tests/test_parallel_stellar_evolution.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,15 +81,20 @@ def test4(self):
8181

8282
def test5(self):
8383
print("Testing ParallelStellarEvolution individual options")
84+
n_workers = 2
8485
base_name = os.path.join(get_path_to_results(), "parallel_stellar_evolution_out_")
85-
for filename in [base_name+str(i) for i in range(3)]:
86+
for filename in [base_name+str(i) for i in range(n_workers)]:
8687
if os.path.exists(filename):
8788
os.remove(filename)
8889

89-
parallel = ParallelStellarEvolution(self.code_factory, number_of_workers=2,
90-
individual_options=[dict(redirect_file=base_name+str(i)) for i in range(3)], redirection="file", **default_options)
90+
parallel = ParallelStellarEvolution(
91+
self.code_factory, number_of_workers=n_workers,
92+
individual_options=[
93+
dict(redirect_file=base_name+str(i))
94+
for i in range(n_workers)],
95+
redirection="file", **default_options)
9196

92-
for filename in [base_name+str(i) for i in range(3)]:
97+
for filename in [base_name+str(i) for i in range(n_workers)]:
9398
self.assertTrue(os.path.exists(filename))
9499

95100
parallel.stop()

0 commit comments

Comments
 (0)