Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge element type #499

Merged
merged 4 commits into from
Jan 27, 2021
Merged

Merge element type #499

merged 4 commits into from
Jan 27, 2021

Conversation

omry
Copy link
Owner

@omry omry commented Jan 27, 2021

Closes #496

Comment on lines 189 to 212
pytest.param(
(
DictConfig({"user007": "???"}, element_type=User),
{"user007": {"age": 99}},
),
{"user007": {"name": "???", "age": 99}},
id="dict:merge_into_sc_element_type:into_missing_element",
),
pytest.param(
(
DictConfig({"user007": User("bond", 7)}, element_type=User),
{"user007": {"age": 99}},
),
{"user007": {"name": "bond", "age": 99}},
id="dict:merge_into_sc_element_type:merging_with_existing_element",
),
pytest.param(
(
DictConfig({"user007": "???"}, element_type=User),
{"user007": {"age": 99}},
),
{"user007": {"name": "???", "age": 99}},
id="dict:merge_into_sc_element_type:merging_into_missing",
),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that the tests with id="dict:merge_into_sc_element_type:into_missing_element" and id="dict:merge_into_sc_element_type:merging_into_missing" are duplicate.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch

@omry omry merged commit e4d34f8 into master Jan 27, 2021
@omry omry deleted the merge_element_type branch January 27, 2021 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DictConfig merge throws away data when element_type is structured
2 participants