示例#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)
示例#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)
示例#3
0
文件: test_tag.py 项目: nicfit/eyed3
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)