-
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.
Merge pull request #86 from LSSTDESC/mpi-error-message
Improve error message when --mpi used incorrectly
- Loading branch information
Showing
5 changed files
with
57 additions
and
6 deletions.
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,22 @@ | ||
import pytest | ||
import subprocess | ||
import os | ||
|
||
def test_executable(): | ||
subprocess.check_call(["ceci", "tests/test.yml"]) | ||
|
||
def test_dry_run(): | ||
subprocess.check_call(["ceci", "--dry-run", "tests/test.yml",]) | ||
|
||
def test_flow_chart_run(): | ||
subprocess.check_call(["ceci", "--flow-chart", "test-flow.png", "tests/test.yml",]) | ||
assert os.path.exists("test-flow.png") | ||
|
||
def test_profiling_and_memmon_flags(): | ||
cmd = "python3 -m ceci_example PZEstimationPipe --DM=./tests/inputs/dm.txt --fiducial_cosmology=./tests/inputs/fiducial_cosmology.txt --config=./tests/config.yml --photoz_pdfs=./tests/outputs/photoz_pdfs.txt --memmon=1 --cprofile=profile.stats" | ||
subprocess.check_call(cmd.split()) | ||
|
||
def test_misuse_mpi(): | ||
cmd = "python3 -m ceci_example PZEstimationPipe --mpi" | ||
with pytest.raises(subprocess.CalledProcessError): | ||
subprocess.check_call(cmd.split()) |
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