~nataliabidart/software-center/winged-migration

« back to all changes in this revision

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

  • Committer: Natalia B. Bidart
  • Date: 2012-05-30 18:39:55 UTC
  • mto: This revision was merged to the branch mainline in revision 3030.
  • Revision ID: natalia.bidart@canonical.com-20120530183955-zbnjczayktmmg5tv
- Initial test cleanup:
  - Renamed test/ dir to tests/.
  - Isolated test code into tests/ directory, including moving all the
    get_test_window_foo from the gtk3 production modules to
    tests/gtk3/windows.py module.
  - Removed all the calls to Gtk.main() in gtk3 tests since that blocks the
    execution of the suite.
  - Pep8 and pyflakes fixes in the files already modified in this branch.
  - Minor bug fix in the softwarecenter/log.py module when trying to create a
    log dir with proper perms.

Show diffs side-by-side

added added

removed removed

Lines of Context:
124
124
 
125
125
    def get_callback_for_page(self, page_id, view_state):
126
126
        return None
127
 
 
128
 
 
129
 
def get_test_window():
130
 
 
131
 
    from softwarecenter.testutils import get_test_gtk3_icon_cache
132
 
    icons = get_test_gtk3_icon_cache()
133
 
 
134
 
    view = PendingPane(icons)
135
 
 
136
 
    # gui
137
 
    scroll = Gtk.ScrolledWindow()
138
 
    scroll.add_with_viewport(view)
139
 
 
140
 
    win = Gtk.Window()
141
 
    win.add(scroll)
142
 
    view.grab_focus()
143
 
    win.set_size_request(500, 200)
144
 
    win.show_all()
145
 
    win.connect("destroy", Gtk.main_quit)
146
 
 
147
 
    return win
148
 
 
149
 
if __name__ == "__main__":
150
 
    logging.basicConfig(level=logging.DEBUG)
151
 
 
152
 
    win = get_test_window()
153
 
    Gtk.main()