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
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
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
def test_15_celdas(): assert not bingo.validar_quince_numeros(micarton)
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)