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_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_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_add_section(simple_section): assert not 'xyz' in simple_section assert not simple_section.has_section('xyz') section = simple_section.add_section('xyz') assert 'xyz' in simple_section assert section == simple_section['xyz'] assert len(simple_section['xyz']) == 0 section['a'] = 10 assert len(simple_section['xyz']) == 1 assert section == simple_section['xyz']
def test_Section_add_section(simple_section): assert not "xyz" in simple_section assert not simple_section.has_section("xyz") section = simple_section.add_section("xyz") assert "xyz" in simple_section assert section == simple_section["xyz"] assert len(simple_section["xyz"]) == 0 section["a"] = 10 assert len(simple_section["xyz"]) == 1 assert section == simple_section["xyz"]
def test_Section_has_section(simple_section): assert not simple_section.has_section('x_value') assert not simple_section.has_section('w_section') assert simple_section.has_section('options')
def test_Section_setitem_section(simple_section): simple_section['xxx'] = {'xx': 11} assert simple_section.has_section('xxx') assert simple_section['xxx'].has_option('xx') assert simple_section['xxx']['xx'] == 11
def test_Section_setitem_section(simple_section): simple_section["xxx"] = {"xx": 11} assert simple_section.has_section("xxx") assert simple_section["xxx"].has_option("xx") assert simple_section["xxx"]["xx"] == 11
def test_Section_has_section(simple_section): assert not simple_section.has_section("x_value") assert not simple_section.has_section("w_section") assert simple_section.has_section("options")