예제 #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
예제 #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
예제 #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
예제 #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
예제 #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
예제 #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
예제 #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
예제 #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
예제 #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
예제 #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')
예제 #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")
예제 #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')