From b9234202ab430b14b6509a0cea099fe1ecd3d17c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20Qui=C3=B1ones?= Date: Tue, 5 Feb 2013 14:11:04 -0300 Subject: [PATCH] Add testcase for Gtk.ComboBox MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Manuel QuiƱones --- tests/graphics/combobox.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 tests/graphics/combobox.py diff --git a/tests/graphics/combobox.py b/tests/graphics/combobox.py new file mode 100644 index 00000000..0c329a0f --- /dev/null +++ b/tests/graphics/combobox.py @@ -0,0 +1,24 @@ +from gi.repository import Gtk + +import common + + +test = common.Test() +test.show() + +# test Gtk.ComboBox: + +store = Gtk.ListStore(int, str) +for i in range(100): + description = "combo test entry %d" % i + store.append([i, description]) + +combobox = Gtk.ComboBox(model=store) +cell = Gtk.CellRendererText() +combobox.pack_start(cell, True) +combobox.add_attribute(cell, 'text', 1) +test.pack_start(combobox, True, True, 0) +combobox.show() + +if __name__ == '__main__': + common.main(test)