Skip to content

Commit

Permalink
add caplog explanation to docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
bgunnar5 committed May 8, 2024
1 parent f9dd437 commit aa2d828
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/unit/utils/test_dict_deep_merge.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ def run_invalid_check(dict_a: Any, dict_b: Any, expected_log: str, caplog: "Fixt
:param dict_a: The value of dict_a that we're testing against
:param dict_b: The value of dict_b that we're testing against
:param expected_log: The log that we're expecting `dict_deep_merge` to write
:param caplog: A built-in fixture from the pytest library to capture logs
"""

# Store initial value of dict_a
Expand Down Expand Up @@ -61,6 +62,7 @@ def test_dict_deep_merge_both_dicts_invalid(dict_a: Any, dict_b: Any, caplog: "F
:param dict_a: The value of dict_a that we're testing against
:param dict_b: The value of dict_b that we're testing against
:param caplog: A built-in fixture from the pytest library to capture logs
"""

# The expected log that's output by dict_deep_merge
Expand Down Expand Up @@ -90,6 +92,7 @@ def test_dict_deep_merge_dict_a_invalid(dict_a: Any, dict_b: Dict[str, str], cap
:param dict_a: The value of dict_a that we're testing against
:param dict_b: The value of dict_b that we're testing against
:param caplog: A built-in fixture from the pytest library to capture logs
"""

# The expected log that's output by dict_deep_merge
Expand Down Expand Up @@ -118,6 +121,7 @@ def test_dict_deep_merge_dict_b_invalid(dict_a: Dict[str, str], dict_b: Any, cap
:param dict_a: The value of dict_a that we're testing against
:param dict_b: The value of dict_b that we're testing against
:param caplog: A built-in fixture from the pytest library to capture logs
"""

# The expected log that's output by dict_deep_merge
Expand Down Expand Up @@ -203,6 +207,8 @@ def test_dict_deep_merge_conflict_no_conflict_handler(caplog: "Fixture"): # noq
Test the `dict_deep_merge` function with a conflicting value in dict_b
and no conflict handler. Since there's no conflict handler this should
log a warning and ignore any merge for the key that has the conflict.
:param caplog: A built-in fixture from the pytest library to capture logs
"""
dict_a = {"test_key": "existing_value"}
dict_b = {"test_key": "new_value"}
Expand Down

0 comments on commit aa2d828

Please sign in to comment.