def test_quality_setter_happy_path(): v = Video("foo.mkv", "./foo") v.quality = "1080p" assert v.quality == "1080p" v.quality = "720p" assert v.quality == "720p" v.quality = "SD" assert v.quality == "SD"
def test_quality_setter_failure(): v = Video("foo.mkv", "./foo") with pytest.raises(AttributeError): v.quality = "not-a-real-quality"
def test_quality_setter_default(): v = Video("foo.mkv", "./foo") v.quality = None assert v.quality == "Unknown"