Skip to content

Commit

Permalink
add to test_defaults_list.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Jasha10 committed Aug 25, 2021
1 parent d61edcc commit e0057c8
Showing 1 changed file with 73 additions and 0 deletions.
73 changes: 73 additions & 0 deletions tests/defaults_list/test_defaults_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -670,6 +670,79 @@ def test_include_nested_group_global(
)


@mark.parametrize(
"config_name, overrides, expected",
[
param(
"group_default_at_global",
[],
[
ResultDefault(
config_path="group1/file1",
package="",
parent="group_default_at_global",
),
ResultDefault(
config_path="group_default_at_global",
package="",
is_self=True,
),
],
id="group_default_at_global",
),
param(
"group_default_at_global",
["+experiment=override_with_global_default2"],
[
ResultDefault(
config_path="group1/file2",
package="",
parent="group_default_at_global",
),
ResultDefault(
config_path="group_default_at_global",
package="",
is_self=True,
),
ResultDefault(
config_path="experiment/override_with_global_default2",
package="experiment",
parent="group_default_at_global",
),
],
id="include_absolute_config:override_with_global_default2",
),
param(
"two_group_defaults_different_pkgs_global",
[],
[
ResultDefault(
config_path="group1/file1",
parent="two_group_defaults_different_pkgs_global",
package="group1",
),
ResultDefault(
config_path="group1/file2",
parent="two_group_defaults_different_pkgs_global",
package="",
),
ResultDefault(
config_path="two_group_defaults_different_pkgs_global",
package="",
is_self=True,
),
],
),
],
)
def test_group_global(
config_name: str, overrides: List[str], expected: List[ResultDefault]
) -> None:
_test_defaults_list_impl(
config_name=config_name, overrides=overrides, expected=expected
)


@mark.parametrize(
"config_name, overrides, expected",
[
Expand Down

0 comments on commit e0057c8

Please sign in to comment.