示例#1
0
文件: iptc.py 项目: mcmclx/py3exiv2
 def test_set_value(self):
     tag = IptcTag('Iptc.Application2.City', ['Seattle'])
     old_value = tag.value
     tag.value = ['Barcelona']
     self.failIfEqual(tag.value, old_value)
示例#2
0
文件: iptc.py 项目: AbdealiJK/pyexiv2
 def test_set_value(self):
     tag = IptcTag('Iptc.Application2.City', ['Seattle'])
     old_value = tag.value
     tag.value = ['Barcelona']
     self.failIfEqual(tag.value, old_value)
示例#3
0
def test_set_value():
    tag = IptcTag('Iptc.Application2.City', ['Seattle'])
    old_value = tag.value
    tag.value = ['Barcelona']
    assert tag.value != old_value
示例#4
0
def test_set_value_non_repeatable():
    tag = IptcTag('Iptc.Application2.ReleaseDate')
    value = [D.today(), D.today()]
    with pytest.raises(KeyError):
        tag.value = value
示例#5
0
def test_set_single_value_raises():
    tag = IptcTag('Iptc.Application2.City', ['Seattle'])
    with pytest.raises(TypeError):
        tag.value = 'Barcelona'