Ejemplo n.º 1
0
def test_Section_as_dict(simple_section):
    d = simple_section.as_dict()
    assert isinstance(d, collections.OrderedDict)
    assert d['x_value'] == 10.1
    assert d['y_value'] == 20.2
    assert isinstance(d['options'], collections.OrderedDict)
    assert d['options']['i_alpha'] == 100
    assert d['options']['f_beta'] == -0.123
    assert d['options']['b_gamma'] == True
    assert isinstance(d['options']['epsilon'], collections.OrderedDict)
    assert d['options']['epsilon']['epsilon_x'] == 10
    assert d['options']['epsilon']['epsilon_y'] == 20
    assert d['options']['epsilon']['epsilon_z'] == 30
    assert d['options']['s_delta'] == 'delta.dat'
    assert d['z_value'] == 30.3
Ejemplo n.º 2
0
def test_Section_as_dict(simple_section):
    d = simple_section.as_dict()
    assert isinstance(d, collections.OrderedDict)
    assert d["x_value"] == 10.1
    assert d["y_value"] == 20.2
    assert isinstance(d["options"], collections.OrderedDict)
    assert d["options"]["i_alpha"] == 100
    assert d["options"]["f_beta"] == -0.123
    assert d["options"]["b_gamma"] == True
    assert isinstance(d["options"]["epsilon"], collections.OrderedDict)
    assert d["options"]["epsilon"]["epsilon_x"] == 10
    assert d["options"]["epsilon"]["epsilon_y"] == 20
    assert d["options"]["epsilon"]["epsilon_z"] == 30
    assert d["options"]["s_delta"] == "delta.dat"
    assert d["z_value"] == 30.3
Ejemplo n.º 3
0
def test_Section_as_dict(simple_section):
    d = simple_section.as_dict()
    assert isinstance(d, collections.OrderedDict)
    assert d['x_value'] == 10.1
    assert d['y_value'] == 20.2
    assert isinstance(d['options'], collections.OrderedDict)
    assert d['options']['i_alpha'] == 100
    assert d['options']['f_beta'] == -0.123
    assert d['options']['b_gamma'] == True
    assert isinstance(d['options']['epsilon'], collections.OrderedDict)
    assert d['options']['epsilon']['epsilon_x'] == 10
    assert d['options']['epsilon']['epsilon_y'] == 20
    assert d['options']['epsilon']['epsilon_z'] == 30
    assert d['options']['s_delta'] == 'delta.dat'
    assert d['z_value'] == 30.3
Ejemplo n.º 4
0
def test_Section_eq_dict(simple_section):
    d = simple_section.as_dict()
    assert simple_section == d
    assert d == simple_section
Ejemplo n.º 5
0
def test_Section_eq_dict(simple_section):
    d = simple_section.as_dict()
    assert simple_section == d
    assert d == simple_section