summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Geddes <vgeddes@src.gnome.org>2007-07-10 23:40:04 +0000
committerVincent Geddes <vgeddes@src.gnome.org>2007-07-10 23:40:04 +0000
commit1a60a1230fe91b9b1f91722826c54da51148b16d (patch)
treeb128abe3e9a43a27616d87a789621f8e6d152b69
parenteabfc634c67bc70f1fff50f78720cce0d712e8b1 (diff)
downloadglade-1a60a1230fe91b9b1f91722826c54da51148b16d.tar.gz
added tests for python bindings
* added tests for python bindings svn path=/branches/BINDINGS/; revision=1446
-rw-r--r--Makefile.am2
-rw-r--r--configure.ac1
-rw-r--r--tests/Makefile.am7
-rw-r--r--tests/test-python-gladeui.py37
4 files changed, 46 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am
index ce20b748..74a618a3 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,4 +1,4 @@
-SUBDIRS = po data gladeui src plugins bindings doc
+SUBDIRS = po data gladeui src plugins bindings tests doc
if HAVE_GNOME_DOC_UTILS
SUBDIRS += help
diff --git a/configure.ac b/configure.ac
index 8fcaf34e..c621735c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -330,6 +330,7 @@ plugins/gnome/icons/16x16/Makefile
plugins/gnome/icons/22x22/Makefile
bindings/Makefile
bindings/python/Makefile
+tests/Makefile
po/Makefile.in
doc/Makefile
doc/version.xml
diff --git a/tests/Makefile.am b/tests/Makefile.am
new file mode 100644
index 00000000..6c30fa3e
--- /dev/null
+++ b/tests/Makefile.am
@@ -0,0 +1,7 @@
+## Process this file with automake to produce Makefile.in
+
+
+EXTRA_DIST = test-python-libgladeui.py
+
+
+
diff --git a/tests/test-python-gladeui.py b/tests/test-python-gladeui.py
new file mode 100644
index 00000000..3fc2941d
--- /dev/null
+++ b/tests/test-python-gladeui.py
@@ -0,0 +1,37 @@
+
+import pygtk
+import gtk
+import gladeui
+
+class Window(gtk.Window):
+
+ def __init__(self):
+ gtk.Window.__init__(self, gtk.WINDOW_TOPLEVEL)
+ self.connect("destroy", self.quit)
+ self.connect("delete_event", self.quit)
+
+ # initialise gladeui app
+ self.app = gladeui.App()
+
+ # add palette to window
+ self.palette = self.app.get_palette()
+ self.palette.set_show_selector_button (True)
+
+ self.add(self.palette)
+ self.palette.show()
+
+ # create a new project
+ self.project = gladeui.Project()
+ self.app.add_project (self.project)
+
+
+ def quit(self, *args):
+ self.hide()
+ gtk.main_quit()
+ return
+
+if __name__ == '__main__':
+ window = Window()
+ window.show()
+ gtk.main()
+