File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -345,8 +345,8 @@ def test_dictionary_style_access() -> None:
345345
346346
347347def test_dunder_key_attr_style_access () -> None :
348- lct = LayeredConfigTree ()
349- lct .update ({"__dunder_key__" : "val" })
348+ lct = LayeredConfigTree ({ "__dunder_key__" : "val" }, layers = [ "layer1" , "layer2" ] )
349+ # lct.update({"__dunder_key__": "val"})
350350 assert lct ["__dunder_key__" ] == "val"
351351
352352 with pytest .raises (
@@ -370,6 +370,10 @@ def test_dunder_key_attr_style_access() -> None:
370370 lct .__dunder_key__ = "val2"
371371 assert lct ["__dunder_key__" ] == "val"
372372
373+ # check that we can modify the value in a new layer
374+ lct ["__dunder_key__" ] = "val2"
375+ assert lct ["__dunder_key__" ] == "val2"
376+
373377 with pytest .raises (AttributeError ):
374378 lct .__non_existent_dunder_key__
375379
You can’t perform that action at this time.
0 commit comments