def test_set_nested05(): my_dict = {} mads._set_nested(my_dict, ["zoop"], None) assert my_dict["zoop"] is None
def test_set_nested04(atlas): with pytest.raises(TypeError): mads._set_nested(atlas, ["zoop"], None)
def test_set_nested02(atlas): mads._set_nested( atlas, ["compound_identifications", 0, ("compound", ), 0, ("inchi_key", )], "FOOBAR") assert atlas.compound_identifications[0].compound[0].inchi_key == "FOOBAR"
def test_set_nested03(atlas): mads._set_nested(atlas, ["name"], "My Atlas") assert atlas.name == "My Atlas"
def test_set_nested01(): with pytest.raises(ValueError): mads._set_nested([], [], 0)