コード例 #1
0
def test_codec_setter():
    v = Video("foo.mkv", "./foo")
    codec = Codec("foo", "bar", "baz")
    v.codec = codec
    assert v.codec == codec
コード例 #2
0
def test_codec_setter_invalid_type():
    v = Video("foo.mkv", "./foo")
    with pytest.raises(TypeError):
        v.codec = "not-a-codec"