Ejemplo n.º 1
0
def test_getters_setters():
    a = App()
    c = Combo(a, ["foo", "bar"])

    assert c.value == "foo"
    c.value = "bar"
    assert c.value == "bar"

    a.destroy()
Ejemplo n.º 2
0
def test_select_default():
    a = App()
    c1 = Combo(a, ["foo", "bar"], selected="bar")
    c2 = Combo(a, ["foo", "bar"])

    assert c1.value == "bar"
    c1.value = "foo"
    assert c1.value == "foo"
    c1.select_default()
    assert c1.value == "bar"

    assert c2.value == "foo"
    c2.value = "bar"
    assert c2.value == "bar"
    c2.select_default()
    assert c2.value == "foo"

    a.destroy()
Ejemplo n.º 3
0
def test_select_default():
    a = App()
    c = Combo(a, ["foo", "bar"], selected="bar")

    assert c.value == "bar"
    c.value = "foo"
    assert c.value == "foo"
    c.select_default()
    assert c.value == "bar"

    a.destroy()