Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/pilas/test/test_interface.py
blob: f76dd81ffc4c35d12d5a7b3e558c67cbe8c7b4ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import pilas

def test_todos_los_objetos_de_interfaz_se_pueden_crear():
    pilas.iniciar()

    deslizador = pilas.interfaz.Deslizador()
    assert deslizador
    assert deslizador.progreso == 0

    boton = pilas.interfaz.Boton()
    assert boton

    ingreso = pilas.interfaz.IngresoDeTexto()
    assert ingreso

    try:
        pilas.interfaz.ListaSeleccion()
    except TypeError:
        assert True   # Se espera esta excepcion, porque un argumento es obligatorio

    lista = pilas.interfaz.ListaSeleccion([('uno')])
    assert lista

    try:
        pilas.interfaz.Selector()
    except TypeError:
        assert True   # el argumento texto es obligatorio.

    selector = pilas.interfaz.Selector("hola")
    assert selector