Skip to content

Commit

Permalink
Add more DATA parsing tests for num_cpu
Browse files Browse the repository at this point in the history
  • Loading branch information
berland committed Dec 4, 2024
1 parent 13fdda2 commit 831e34b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/ert/unit_tests/config/test_num_cpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,18 @@ def test_num_cpu_from_config_preferred():
assert ert_config.preferred_num_cpu == config_num_cpu


@pytest.mark.parametrize(
"parallelsuffix", [("/"), (" /"), (" DISTRIBUTED/"), (" DISTRIBUTED /")]
)
@pytest.mark.usefixtures("use_tmpdir")
def test_num_cpu_from_data_file_used_if_config_num_cpu_not_set():
def test_num_cpu_from_data_file_used_if_config_num_cpu_not_set(parallelsuffix):
data_file = "dfile"
data_file_num_cpu = 4
with open(file=data_file, mode="w", encoding="utf-8") as data_file_hander:
data_file_hander.write(
f"""
PARALLEL
{data_file_num_cpu} DISTRIBUTED/
{data_file_num_cpu}{parallelsuffix}
"""
)
config_dict = {
Expand Down

0 comments on commit 831e34b

Please sign in to comment.