Ejemplo n.º 1
0
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
Ejemplo n.º 2
0
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
Ejemplo n.º 3
0
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
Ejemplo n.º 4
0
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
Ejemplo n.º 5
0
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
Ejemplo n.º 6
0
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
Ejemplo n.º 7
0
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
Ejemplo n.º 8
0
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
Ejemplo n.º 9
0
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
Ejemplo n.º 10
0
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')
Ejemplo n.º 11
0
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")
Ejemplo n.º 12
0
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')