~gary-lasker/software-center/misc-fixes

« back to all changes in this revision

Viewing changes to softwarecenter/ui/gtk3/panes/globalpane.py

  • Committer: Michael Vogt
  • Date: 2011-08-10 07:35:53 UTC
  • Revision ID: michael.vogt@ubuntu.com-20110810073553-shv8mlu1arm58ihp
* test/gtk3/test_panes.py:
  - add basic tests for the various panes
* softwarecenter/testutils.py:
  - add helper factory methods to make writing tests easier

Show diffs side-by-side

added added

removed removed

Lines of Context:
102
102
        #~ cr.rel_line_to(a.width+1, 0)
103
103
        #~ cr.stroke()
104
104
        return
 
105
 
 
106
def get_test_window():
 
107
 
 
108
    from softwarecenter.testutils import (get_test_db,
 
109
                                          get_test_datadir,
 
110
                                          get_test_gtk3_viewmanager,
 
111
                                          get_test_pkg_info,
 
112
                                          get_test_gtk3_icon_cache,
 
113
                                          )
 
114
    vm = get_test_gtk3_viewmanager()
 
115
    db = get_test_db()
 
116
    cache = get_test_pkg_info()
 
117
    datadir = get_test_datadir()
 
118
    icons = get_test_gtk3_icon_cache()
 
119
 
 
120
    p = GlobalPane(vm, datadir, db, cache, icons)
 
121
 
 
122
    win = Gtk.Window()
 
123
    win.connect("destroy", Gtk.main_quit)
 
124
    win.add(p)
 
125
    win.show_all()
 
126
    return win
 
127
 
 
128
if __name__ == "__main__":
 
129
 
 
130
    win = get_test_window()
 
131
    
 
132
    Gtk.main()