-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✅ Add sweep integration test with ProcessDef
- Loading branch information
1 parent
0d4def6
commit 6dd5b04
Showing
1 changed file
with
27 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
"""Integration test for sweep updates.""" | ||
import pytest_check as check | ||
|
||
from cliconfig import make_config, update_config | ||
|
||
|
||
def test_sweep() -> None: | ||
"""Integration test for sweep.""" | ||
config = make_config("tests/configs/integration/sweep.yaml", no_cli=True) | ||
expected_dict = { | ||
"args": {"a": 5, "b": 3, "c": True, "d": [1, 0]}, | ||
"res": [1, 0, 3, 6], | ||
} | ||
check.equal(config.dict, expected_dict) | ||
|
||
config = update_config( | ||
config, {"args": {"a": 2, "b": 7, "c": False, "d": [1, 2, 3]}} | ||
) | ||
expected_dict = { | ||
"args": {"a": 2, "b": 7, "c": False, "d": [1, 2, 3]}, | ||
"res": [1, 2, 3, 0, 7], | ||
} | ||
check.equal(config.dict, expected_dict) | ||
config = update_config(config, {"args": {"a": 2}, "res": 5}) | ||
check.equal(config.res, 5) | ||
config = update_config(config, {"args": {"a": 3}}) | ||
check.equal(config.res, 5) |