Пример #1
0
def test_seniori_zdarma():
    assert spocitej_slevu_jizdneho(30.0, 100) == 0
Пример #2
0
def test_zaporny_vek_konci_vyjimkou():
    with pytest.raises(ValueError):
        spocitej_slevu_jizdneho(30.0, -666)
Пример #3
0
def test_zaporna_cena_konci_vyjimkou():
    with pytest.raises(ValueError):
        spocitej_slevu_jizdneho(-30.0, 12)
Пример #4
0
def test_mladez_za_polovinu_hranicni_vek():
    assert spocitej_slevu_jizdneho(30.0, 18) == 15.0
Пример #5
0
def test_deti_zadarmo():
    assert spocitej_slevu_jizdneho(30.0, 5) == 0.0
Пример #6
0
def test_senior_za_tretinu():
    assert spocitej_slevu_jizdneho(30.0, 70) == 10.0
Пример #7
0
def test_mladez_za_polovinu():
    assert spocitej_slevu_jizdneho(30.0, 16) == 15.0
Пример #8
0
def test_dospely_za_plnou_cenu():
    assert spocitej_slevu_jizdneho(30.0, 35) == 30.0