示例#1
0
def test_contar_celdas_ocupadas():
   mi_carton = (
       (1,0,1,0,0,1,0,1,1),
       (1,1,0,1,1,0,1,0,1),
       (1,0,0,0,1,0,0,1,1),
   )
   assert validar_quince_numeros(mi_carton) == True
   mi_carton_falso = (
       (1,0,1,0,1,1,0,1,1),
       (1,1,0,1,1,0,1,0,1),
       (1,0,0,0,1,0,0,1,1),
   )
   assert validar_quince_numeros(mi_carton_falso) == False
示例#2
0
def test_contar_celdas_ocupadas():
    carton = (
        (1,0,1,0,0,1,0,0,1),
        (1,0,0,1,0,0,1,0,1),
        (1,0,0,0,1,0,0,1,1),
     )
    # Esperamos encontrar 15 celdas ocupadas.
    assert validar_quince_numeros(carton) == True
示例#3
0
def test_contar_celdas_ocupadas():
    micarton = carton()
    contador = 0
    for fila in micarton:
        for celda in fila:
            contador = contador + celda

    #Esperamos encontrar 15 celdas ocupadas.
    assert validar_quince_numeros(micarton) == True
示例#4
0
def test_15_celdas():
    assert not bingo.validar_quince_numeros(micarton)
示例#5
0
def test_contar_celdas_ocupadas():
    assert validar_quince_numeros(carton_valido)
    assert validar_quince_numeros(carton_valido_programa)
    assert not validar_quince_numeros(carton_invalido1)