Ejemplo n.º 1
0
def test_read():
    ini = INI("test.ini")
    assert ini.read("section0", "integer") == 39
    assert np.isclose(ini.read("section1", "float"), np.e)
    assert ini.read("section0", "string") == "hello world, this is an ini file"
    assert ini.read("section1", "list") == ["Linux", "rocks"]
    # assert ini.read('section1', 'tuple') == ('Linux', 'rocks')
    assert ini.read("section0", "none") is None
    assert ini.read("section1", "true") is True
    assert ini.read("section1", "false") is False
Ejemplo n.º 2
0
def test_read():
    ini = INI("test.ini")
    assert ini.read("section0", "integer") == 39
    assert np.isclose(ini.read("section1", "float"), np.e)
    assert ini.read("section0", "string") == "hello world, this is an ini file"
    assert ini.read("section1", "list") == ["Linux", "rocks"]
    # assert ini.read('section1', 'tuple') == ('Linux', 'rocks')
    assert ini.read("section0", "none") is None
    assert ini.read("section1", "true") is True
    assert ini.read("section1", "false") is False
Ejemplo n.º 3
0
def test_read():
    ini = INI('test.ini')
    assert ini.read('section0', 'integer') == 39
    assert np.isclose(ini.read('section1', 'float'), np.e)
    assert ini.read('section0', 'string') == 'hello world, this is an ini file'
    assert ini.read('section1', 'list') == ['Linux', 'rocks']
    #assert ini.read('section1', 'tuple') == ('Linux', 'rocks')
    assert ini.read('section0', 'none') is None
    assert ini.read('section1', 'true') is True
    assert ini.read('section1', 'false') is False