def test_reface_ultima_cheltuiala():
    l = []
    undolist = []
    adauga_cheltuiala(l, creeaza_cheltuiala(1, 150, "mancare"), undolist)
    assert (len(l) == 1)
    reface_ultima_cheltuiala(l, undolist)
    assert (len(l) == 0)
    
    adauga_cheltuiala(l, creeaza_cheltuiala(1, 150, "mancare"), undolist)
    adauga_cheltuiala(l, creeaza_cheltuiala(3, 250, "mancare"), undolist)
    adauga_cheltuiala(l, creeaza_cheltuiala(4, 650, "telefon"), undolist)
    assert (len(l) == 3)
    reface_ultima_cheltuiala(l, undolist)
    assert (len(l) == 2)
    reface_ultima_cheltuiala(l, undolist)
    assert (len(l) == 1)
Ejemplo n.º 2
0
def test_reface_ultima_cheltuiala():
    l = []
    undolist = []
    adauga_cheltuiala(l, creeaza_cheltuiala(1, 150, "mancare"), undolist)
    assert (len(l) == 1)
    reface_ultima_cheltuiala(l, undolist)
    assert (len(l) == 0)

    adauga_cheltuiala(l, creeaza_cheltuiala(1, 150, "mancare"), undolist)
    adauga_cheltuiala(l, creeaza_cheltuiala(3, 250, "mancare"), undolist)
    adauga_cheltuiala(l, creeaza_cheltuiala(4, 650, "telefon"), undolist)
    assert (len(l) == 3)
    reface_ultima_cheltuiala(l, undolist)
    assert (len(l) == 2)
    reface_ultima_cheltuiala(l, undolist)
    assert (len(l) == 1)
Ejemplo n.º 3
0
def ui_reface_ultima_cheltuiala(l, undolist):
    reface_ultima_cheltuiala(l, undolist)
    print("Lista a fost refacuta cu cheltuielile anterioare")
Ejemplo n.º 4
0
def ui_reface_ultima_cheltuiala(l, undolist):
    reface_ultima_cheltuiala(l, undolist)
    print("Lista a fost refacuta cu cheltuielile anterioare")