diff --git a/tests/tests.py b/tests/tests.py index 2a9ae0f..ed88f76 100644 --- a/tests/tests.py +++ b/tests/tests.py @@ -330,6 +330,7 @@ def test_get(self, dict_type, data, key, result): @pytest.mark.parametrize( "data,key,default", [ + ({}, "b", None), ({"a": 42}, "b", "default"), ({"a": {"b": 42}}, "a.c", "default"), ({"a": {"b": {"c": 42}}}, "a.b.d", "default"), @@ -433,6 +434,7 @@ def test_pop(self, dict_type, data, key, result): @pytest.mark.parametrize( "data,key,default", [ + ({}, "b", None), ({"a": 1}, "b", 42), ({"a": {"b": 1}}, "c.b", 42), ({"a": {"b": 1}}, "a.c", 42), @@ -561,6 +563,7 @@ def test_setdefault(self, dict_type, data, key, result): @pytest.mark.parametrize( "data,key,default", [ + ({}, "b", None), ({"a": 1}, "b", "default"), ({"a": {"b": 1}}, "a.c", "default"), ({"a": {"b": {"c": 1}}}, "a.b.d", "default"),