Ejemplo n.º 1
0
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"
Ejemplo n.º 2
0
def test_quality_setter_failure():
    v = Video("foo.mkv", "./foo")
    with pytest.raises(AttributeError):
        v.quality = "not-a-real-quality"
Ejemplo n.º 3
0
def test_quality_setter_default():
    v = Video("foo.mkv", "./foo")
    v.quality = None
    assert v.quality == "Unknown"