def test_nested_string(self): assert dict_from_path("very.nested.key", 1) == { "very": { "nested": { "key": 1 } } }
def test_digits_are_treated_as_strings(self): assert dict_from_path("0.key", 1) == {"0": {"key": 1}}
def test_dotted_pair_string(self): assert dict_from_path("nested.key", 1) == {"nested": {"key": 1}}
def test_simple_string(self): assert dict_from_path("key", 1) == {"key": 1}