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')
def test_scalar_abstract(): el = Scalar() with pytest.raises(NotImplementedError): el.set('blagga')
def test_scalar_abstract(): el = Scalar() assert_raises(NotImplementedError, el.set, 'blagga')