Exemplo n.º 1
0
def test_false_to_pref_softerror():
    aux = _Faux()
    try:
        member_to_pref(aux, aux.get_member(str('int_')), 'a')
    except NotImplementedError:
        assert True is True
Exemplo n.º 2
0
def test_member_to_pref6():
    aux = _Aux()
    member = aux.get_member(str('odict_'))
    assert member_to_pref(aux, member, {"a": 1.0}) == repr([(u'a', 1.0)])
Exemplo n.º 3
0
def test_member_to_pref7():
    aux = _Aux()
    member = aux.get_member(str('value'))
    assert member_to_pref(aux, member, 'test.test') == 'test.test'
Exemplo n.º 4
0
def test_member_to_pref5():
    aux = _Aux()
    member = aux.get_member(str('list_'))
    assert member_to_pref(aux, member, [1.0, 2.0]) == '[1.0, 2.0]'
Exemplo n.º 5
0
def test_member_to_pref4():
    aux = _Aux()
    assert member_to_pref(aux, aux.get_member(str('enum_float')), 1.0) == '1.0'
Exemplo n.º 6
0
def test_member_to_pref3():
    aux = _Aux(enum=str('a'))
    assert member_to_pref(aux, aux.get_member(str('enum')), 'a') == 'a'
Exemplo n.º 7
0
def test_member_to_pref2():
    aux = _Aux()
    assert member_to_pref(aux, aux.get_member(str('float_n')), 1.0) == '1.0'
Exemplo n.º 8
0
def test_member_to_pref1():
    aux = _Aux()
    assert member_to_pref(aux, aux.get_member(str('string')), 'a') == 'a'