-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
51 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
from ceci.sites import load, get_default_site | ||
from ceci.pipeline import StageExecutionConfig | ||
from ceci.main import run | ||
import pytest | ||
|
||
|
||
def test_cori_error(): | ||
# check that errors when trying to run multi-process | ||
# jobs on cori login nodes are handled correctly. | ||
# should fail unless dry-run is set. | ||
|
||
launcher_config = { | ||
"name": "mini", | ||
"interval": 1.0, | ||
} | ||
site_config = { | ||
"name": "cori-interactive", | ||
} | ||
|
||
stage_config = { | ||
"name": "Test", | ||
"nprocess": 2, | ||
} | ||
|
||
load(launcher_config, [site_config]) | ||
site = get_default_site() | ||
sec = StageExecutionConfig(stage_config) | ||
|
||
# should fail if we don't set dry-run | ||
with pytest.raises(ValueError): | ||
site.command("xxx", sec) | ||
|
||
# should work if we do set dry-run | ||
launcher_config["dry_run"] = True | ||
load(launcher_config, [site_config]) | ||
site = get_default_site() | ||
site.command("xxx", sec) |