Esempio n. 1
0
def ejercicio5_test2():
    s = "Factorial de 1"
    fact_test = 1
    try:
        fact = tppy1.factorial(1)
        test.print_test(s, fact_test == fact)
    except Exception as err:
        error_by_except(s, err)
Esempio n. 2
0
def ejercicio5_test6():
    s = "Factorial de numero positivo alto"
    num = 50
    fact_test = math.factorial(num)
    try:
        fact = tppy1.factorial(num)
        test.print_test(s, fact_test == fact)
    except Exception as err:
        error_by_except(s, err)
Esempio n. 3
0
def ejercicio5_test5():
    s = "Factorial de numero positivo medio"
    num = 10
    fact_test = 3628800
    try:
        fact = tppy1.factorial(num)
        test.print_test(s, fact_test == fact)
    except Exception as err:
        error_by_except(s, err)
Esempio n. 4
0
def ejercicio5_test3():
    s = "Factorial de numero positivo chico"
    num = 5
    fact_test = 5 * 4 * 3 * 2 * 1
    try:
        fact = tppy1.factorial(num)
        test.print_test(s, fact_test == fact)
    except Exception as err:
        error_by_except(s, err)