From: Philip Chimento Date: Fri, 12 Oct 2012 12:17:07 +0000 (+0200) Subject: Improve Python test program X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;h=c56e88127138703089603e35795e4463526a3e68;p=projects%2Fchimara%2Fchimara.git Improve Python test program to make testing easier --- diff --git a/tests/testpeas.py b/tests/testpeas.py index 02c5a38..b6335df 100644 --- a/tests/testpeas.py +++ b/tests/testpeas.py @@ -1,14 +1,18 @@ +import os.path from gi.repository import Gtk, Peas, PeasGtk, Chimara c = Chimara.Glk() e = Peas.Engine.get_default() -e.add_search_path('/Users/fliep/gtk/inst/lib/chimara', None) +e.add_search_path(os.path.expanduser('~/gtk/inst/lib/chimara'), + os.path.expanduser('~/gtk/inst/lib/chimara/plugins')) -for i in e.get_plugin_list(): - print i.get_name() +frotz_info = e.get_plugin_info('frotz') +e.load_plugin(frotz_info) w = Gtk.Window() -w.add(PeasGtk.PluginManager(e)) +m = PeasGtk.PluginManager(e) +m.get_view().set_selected_plugin(frotz_info) +w.add(m) w.connect('destroy', Gtk.main_quit) w.show_all()