Пример #1
0
def pytest_funcarg__etf(request):
    etf = gtk.TextView()
    apply_addon(etf, EmptyTextViewFiller, empty_text='enter something')
    w = gtk.Window()
    v = gtk.VBox()
    w.add(v)
    e = gtk.Entry()
    v.add(e)
    v.add(etf)
    w.show()
    return etf, e
Пример #2
0
def test_addon_default_values():
    w = gtk.Button()
    apply_addon(w, StockButtonPlugin)
    assert w.addons.stock_button
    assert w.get_label() == gtk.STOCK_OK
    assert w.get_use_stock()
Пример #3
0
def test_addon_init_values():
    w = gtk.Button()
    apply_addon(w, StockButtonPlugin, stock=gtk.STOCK_CANCEL)
    assert w.addons.stock_button
    assert w.get_label() == gtk.STOCK_CANCEL
    assert w.get_use_stock()