Beispiel #1
0
def test_scalar_assignments_are_independent():
    element = Scalar()

    assert not element.u
    assert not element.value
    element.u = u'abc'
    assert element.value is None

    element = Scalar()
    assert not element.u
    assert not element.value
    element.value = u'abc'
    eq_(element.u, u'')
    eq_(element.value, u'abc')
Beispiel #2
0
def test_scalar_assignments_are_independent():
    element = Scalar()

    assert not element.u
    assert not element.value
    element.u = u'abc'
    assert element.value is None

    element = Scalar()
    assert not element.u
    assert not element.value
    element.value = u'abc'
    eq_(element.u, u'')
    eq_(element.value, u'abc')
Beispiel #3
0
def test_scalar_abstract():
    el = Scalar()
    with pytest.raises(NotImplementedError):
        el.set('blagga')
Beispiel #4
0
def test_scalar_abstract():
    el = Scalar()
    assert_raises(NotImplementedError, el.set, 'blagga')