コード例 #1
0
def ui_actualizeaza_cheltuiala(l, undolist):
    ziua = 0
    suma = 0
    tip = ""
    try:
        ziua = int(input("Selectati ziua: "))
        tip = input("Selectati tipul: ")
        suma = int(input("Introduceti noua suma: "))
        actualizeaza_cheltuiala(l, ziua, tip, suma, undolist)
    except ValueError:
        print("Ati introdus date gresite")
    print("Ati actualizat cheltuiala")
コード例 #2
0
def ui_actualizeaza_cheltuiala(l, undolist):
    ziua = 0
    suma = 0
    tip = ""
    try:
        ziua = int(input("Selectati ziua: "))
        tip = input("Selectati tipul: ")
        suma = int(input("Introduceti noua suma: "))
        actualizeaza_cheltuiala(l, ziua, tip, suma, undolist)
    except ValueError:
        print("Ati introdus date gresite")
    print("Ati actualizat cheltuiala")
コード例 #3
0
def test_actualizeaza_cheltuiala():
    l = setUp()
    undolist = setUp()
    
    actualizeaza_cheltuiala(l, 2, "imbracaminte", 200, undolist)
    assert( l[0]["suma"] == 200 )
    
    actualizeaza_cheltuiala(l, 3, "telefon", 300, undolist)
    assert( l[2]["suma"] == 300 )
    
    actualizeaza_cheltuiala(l, 5, "intretinere", 200, undolist)
    assert( l[1]["suma"] == 200 )
コード例 #4
0
def test_actualizeaza_cheltuiala():
    l = setUp()
    undolist = setUp()

    actualizeaza_cheltuiala(l, 2, "imbracaminte", 200, undolist)
    assert (l[0]["suma"] == 200)

    actualizeaza_cheltuiala(l, 3, "telefon", 300, undolist)
    assert (l[2]["suma"] == 300)

    actualizeaza_cheltuiala(l, 5, "intretinere", 200, undolist)
    assert (l[1]["suma"] == 200)