Esempio n. 1
0
def testReadOnly():
    assert_false(Tag.read_only)

    t = Tag()
    assert_false(t.read_only)

    t.read_only = True
    assert_raises(RuntimeError, t.save)
    assert_raises(RuntimeError, t._saveV1Tag, None)
    assert_raises(RuntimeError, t._saveV2Tag, None, None, None)
Esempio n. 2
0
def testReadOnly():
    assert not (Tag.read_only)

    t = Tag()
    assert not (t.read_only)

    t.read_only = True
    with pytest.raises(RuntimeError):
        t.save()
    with pytest.raises(RuntimeError):
        t._saveV1Tag(None)
    with pytest.raises(RuntimeError):
        t._saveV2Tag(None, None, None)
Esempio n. 3
0
def testReadOnly():
    assert not(Tag.read_only)

    t = Tag()
    assert not(t.read_only)

    t.read_only = True
    with pytest.raises(RuntimeError):
        t.save()
    with pytest.raises(RuntimeError):
        t._saveV1Tag(None)
    with pytest.raises(RuntimeError):
        t._saveV2Tag(None, None, None)