def test_codec_setter(): v = Video("foo.mkv", "./foo") codec = Codec("foo", "bar", "baz") v.codec = codec assert v.codec == codec
def test_codec_setter_invalid_type(): v = Video("foo.mkv", "./foo") with pytest.raises(TypeError): v.codec = "not-a-codec"