Skip to content

Commit

Permalink
updated tests for new exception
Browse files Browse the repository at this point in the history
  • Loading branch information
R1j1t committed May 27, 2024
1 parent b9df25b commit e139eb5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions parsl/tests/test_mpi_apps/test_mpi_mode_enabled.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from parsl import python_app, bash_app
from parsl.tests.configs.htex_local import fresh_config

from parsl.executors.high_throughput.mpi_prefix_composer import InvalidResourceSpecification
from parsl.executors.high_throughput.mpi_prefix_composer import MissingResourceSpecification

import os

Expand Down Expand Up @@ -175,6 +175,6 @@ def test_simulated_load(rounds: int = 100):
@pytest.mark.local
def test_missing_resource_spec():

with pytest.raises(InvalidResourceSpecification):
with pytest.raises(MissingResourceSpecification):
future = mock_app(sleep_dur=0.4)
future.result(timeout=10)
5 changes: 3 additions & 2 deletions parsl/tests/test_mpi_apps/test_resource_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
)
from parsl.executors.high_throughput.mpi_prefix_composer import (
validate_resource_spec,
InvalidResourceSpecification
InvalidResourceSpecification,
MissingResourceSpecification
)

EXECUTOR_LABEL = "MPI_TEST"
Expand Down Expand Up @@ -131,7 +132,7 @@ def test_top_level():
({"num_nodes": 2, "ranks_per_node": 1}, True, None),
({"launcher_options": "--debug_foo"}, True, None),
({"num_nodes": 2, "BAD_OPT": 1}, True, InvalidResourceSpecification),
({}, True, InvalidResourceSpecification),
({}, True, MissingResourceSpecification),
)
)
def test_resource_spec(resource_spec: Dict, is_mpi_enabled: bool, exception):
Expand Down

0 comments on commit e139eb5

Please sign in to comment.