Ejemplo n.º 1
0
def test_member_from_pref3():
    aux = _Aux()
    assert member_from_pref(aux, aux.get_member(str('enum')), 'a') == 'a'
Ejemplo n.º 2
0
def test_member_from_pref1():
    aux = _Aux()
    assert member_from_pref(aux, aux.get_member(str('string')), 'a') == 'a'
Ejemplo n.º 3
0
def test_member_from_pref2():
    aux = _Aux()
    assert member_from_pref(aux, aux.get_member(
        str('float_n')), '1.0') == 1.0
Ejemplo n.º 4
0
def test_member_from_pref7():
    aux = _Aux()
    member = aux.get_member(str('value'))
    assert member_from_pref(aux, member, 'test.test') == 'test.test'
Ejemplo n.º 5
0
def test_false_from_pref_softerror():
    aux = _Faux()
    with pytest.raises(NotImplementedError):
        member_from_pref(aux, aux.get_member(str('int_')), 'a')
Ejemplo n.º 6
0
def test_member_from_pref5():
    aux = _Aux()
    member = aux.get_member(str('list_'))
    assert member_from_pref(aux, member, '[1.0, 2.0]') == [1.0, 2.0]
Ejemplo n.º 7
0
def test_member_from_pref6():
    aux = _Aux()
    member = aux.get_member(str('odict_'))
    assert member_from_pref(aux, member, repr([(u'a', 1.0)])) == {"a": 1.0}
Ejemplo n.º 8
0
def test_member_from_pref3():
    aux = _Aux()
    assert member_from_pref(aux, aux.get_member(str('enum')), 'a') == 'a'
Ejemplo n.º 9
0
def test_member_from_pref4():
    aux = _Aux()
    assert member_from_pref(aux, aux.get_member(
        str('enum_float')), '1.0') == 1.0
Ejemplo n.º 10
0
def test_member_from_pref1():
    aux = _Aux()
    assert member_from_pref(aux, aux.get_member(str('string')), 'a') == 'a'
Ejemplo n.º 11
0
def test_member_from_pref2():
    aux = _Aux()
    assert member_from_pref(aux, aux.get_member(
        str('float_n')), '1.0') == 1.0
Ejemplo n.º 12
0
def test_false_from_pref_softerror():
    aux = _Faux()
    with pytest.raises(NotImplementedError):
        member_from_pref(aux, aux.get_member(str('int_')), 'a')
Ejemplo n.º 13
0
def test_member_from_pref7():
    aux = _Aux()
    member = aux.get_member(str('value'))
    assert member_from_pref(aux, member, 'test.test') == 'test.test'
Ejemplo n.º 14
0
def test_member_from_pref6():
    aux = _Aux()
    member = aux.get_member(str('odict_'))
    assert member_from_pref(aux, member, repr([(u'a', 1.0)])) == {"a": 1.0}
Ejemplo n.º 15
0
def test_member_from_pref5():
    aux = _Aux()
    member = aux.get_member(str('list_'))
    assert member_from_pref(aux, member, '[1.0, 2.0]') == [1.0, 2.0]
Ejemplo n.º 16
0
def test_member_from_pref4():
    aux = _Aux()
    assert member_from_pref(aux, aux.get_member(
        str('enum_float')), '1.0') == 1.0