def test_Section_delitem_option(simple_section): assert simple_section.has_option("y_value") del simple_section["y_value"] assert not simple_section.has_option("y_value") simple_section["y_value"] = {"yy": 22} assert simple_section.has_section("y_value") assert simple_section["y_value"]["yy"] == 22
def test_Section_delitem_option(simple_section): assert simple_section.has_option('y_value') del simple_section['y_value'] assert not simple_section.has_option('y_value') simple_section['y_value'] = {'yy': 22} assert simple_section.has_section('y_value') assert simple_section['y_value']['yy'] == 22
def test_Section_delitem_section(simple_section): assert simple_section.has_section('options') del simple_section['options'] assert not simple_section.has_section('options') simple_section['options'] = 123 assert simple_section.has_option('options') assert simple_section['options'] == 123
def test_Section_setitem_option(simple_section): simple_section['xxx'] = 100 assert simple_section.has_option('xxx') assert simple_section['xxx'] == 100 simple_section['options']['yyy'] = 200 assert simple_section['options'].has_option('yyy') assert simple_section['options']['yyy'] == 200
def test_Section_delitem_section(simple_section): assert simple_section.has_section("options") del simple_section["options"] assert not simple_section.has_section("options") simple_section["options"] = 123 assert simple_section.has_option("options") assert simple_section["options"] == 123
def test_Section_setitem_option(simple_section): simple_section["xxx"] = 100 assert simple_section.has_option("xxx") assert simple_section["xxx"] == 100 simple_section["options"]["yyy"] = 200 assert simple_section["options"].has_option("yyy") assert simple_section["options"]["yyy"] == 200
def test_Section_has_option(simple_section): assert simple_section.has_option('x_value') assert not simple_section.has_option('w_value') assert not simple_section.has_option('options')
def test_Section_has_option(simple_section): assert simple_section.has_option("x_value") assert not simple_section.has_option("w_value") assert not simple_section.has_option("options")