-
Notifications
You must be signed in to change notification settings - Fork 14
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 #6 from NVIDIA/acc-tests
Acceptence tests
- Loading branch information
Showing
6 changed files
with
38 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,4 +52,4 @@ jobs: | |
run: pip install pytest -r requirements-dev.txt | ||
|
||
- name: Run pytest | ||
run: pytest -vv | ||
run: pytest -vv --cov |
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 |
---|---|---|
|
@@ -5,4 +5,4 @@ pandas-stubs==2.2.* | |
pyright==1.1.359 | ||
build==1.2.* | ||
vulture==2.11 | ||
|
||
pytest-cov==5.0.* |
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,30 @@ | ||
import argparse | ||
from pathlib import Path | ||
|
||
import pytest | ||
from cloudai.__main__ import handle_dry_run_and_run | ||
|
||
SLURM_TEST_SCENARIOS = [ | ||
Path("conf/v0.6/general/test_scenario/sleep/test_scenario.toml"), | ||
Path("conf/v0.6/general/test_scenario/ucc_test/test_scenario.toml"), | ||
] | ||
|
||
|
||
@pytest.mark.parametrize("test_scenario_path", SLURM_TEST_SCENARIOS, ids=lambda x: str(x)) | ||
def test_slurm(tmp_path: Path, test_scenario_path: Path): | ||
args = argparse.Namespace( | ||
log_file=None, | ||
log_level=None, | ||
mode="dry-run", | ||
output_path=str(tmp_path), | ||
system_config_path="conf/v0.6/general/system/example_slurm_cluster.toml", | ||
test_scenario_path=str(test_scenario_path), | ||
test_path="conf/v0.6/general/test", | ||
test_template_path="conf/v0.6/general/test_template", | ||
) | ||
handle_dry_run_and_run(args) | ||
|
||
test_dir = list(tmp_path.glob("*"))[0] | ||
for td in test_dir.iterdir(): | ||
assert td.is_dir(), "Invalid test directory" | ||
assert "Tests." in td.name, "Invalid test directory name" |