예제 #1
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
예제 #2
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
예제 #3
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
예제 #4
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
예제 #5
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
예제 #6
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
예제 #7
0
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']
예제 #8
0
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"]
예제 #9
0
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']
예제 #10
0
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')
예제 #11
0
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
예제 #12
0
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
예제 #13
0
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")
예제 #14
0
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
예제 #15
0
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')