Example #1
0
    def setUp(self):
        self.win = get_test_window_appdetails()
        self.addCleanup(self.win.destroy)
        self.view = self.win.get_data("view")

        app = Application("", self.app_name)
        self.app_mock = get_mock_app_from_real_app(app)
        self.app_mock.details.pkg_state = self.pkg_state
Example #2
0
 def test_install_appdetails(self):
     win = get_test_window_appdetails()
     self.addCleanup(win.destroy)
     view = win.get_data("view")
     view.show_app(Application("", "2vcard"))
     view.backend.emit('transaction-progress-changed',
                       view.app_details.pkgname, 10)
     self.assertTrue(view.pkg_statusbar.progress.get_property("visible"))
Example #3
0
    def setUp(self):
        self.win = get_test_window_appdetails()
        self.addCleanup(self.win.destroy)
        self.view = self.win.get_data("view")

        app = Application("", self.app_name)
        self.app_mock = get_mock_app_from_real_app(app)
        self.app_mock.details.pkg_state = self.pkg_state
 def test_install_appdetails(self):
     win = get_test_window_appdetails()
     self.addCleanup(win.destroy)
     view = win.get_data("view")
     view.show_app(Application("", "2vcard"))
     view.backend.emit('transaction-progress-changed',
         view.app_details.pkgname, 10)
     self.assertTrue(view.pkg_statusbar.progress.get_property("visible"))
 def test_memleak_appdetails(self):
     cache = get_pkg_info()
     cache.open(blocking=True)
     win = get_test_window_appdetails()
     view = win.get_data("view")
     app = Application("", "gedit")
     # get baseline
     view.show_app(app)
     do_events_with_sleep()
     with TraceMemoryUsage("AppdetailsView.show_app()"):
         for i in range(self.ITERATIONS):
             view.show_app(app, force=True)
             # this causes a huge memleak of ~35mb/run
             cache.open()
             do_events_with_sleep()
 def test_memleak_app_recommendations(self):
     cache = get_pkg_info()
     cache.open(blocking=True)
     win = get_test_window_appdetails()
     view = win.get_data("view")
     app = Application("", "gedit")
     # get baseline
     view.show_app(app)
     do_events_with_sleep()
     with TraceMemoryUsage("AppdetailsView.show_app()"):
         with TraceActiveObjectTypes("view.recommended_for_app.set_pkgname"):
             for i in range(self.ITERATIONS):
                 view.recommended_for_app_panel.set_pkgname("gedit")
                 cache.open()
                 do_events_with_sleep()
Example #7
0
 def test_memleak_appdetails(self):
     cache = get_pkg_info()
     cache.open(blocking=True)
     win = get_test_window_appdetails()
     view = win.get_data("view")
     app = Application("", "gedit")
     # get baseline
     view.show_app(app)
     do_events_with_sleep()
     with TraceMemoryUsage("AppdetailsView.show_app()"):
         for i in range(self.ITERATIONS):
             view.show_app(app, force=True)
             # this causes a huge memleak of ~35mb/run
             cache.open()
             do_events_with_sleep()
Example #8
0
 def test_memleak_app_recommendations(self):
     cache = get_pkg_info()
     cache.open(blocking=True)
     win = get_test_window_appdetails()
     view = win.get_data("view")
     app = Application("", "gedit")
     # get baseline
     view.show_app(app)
     do_events_with_sleep()
     with TraceMemoryUsage("AppdetailsView.show_app()"):
         with TraceActiveObjectTypes(
                 "view.recommended_for_app.set_pkgname"):
             for i in range(self.ITERATIONS):
                 view.recommended_for_app_panel.set_pkgname("gedit")
                 cache.open()
                 do_events_with_sleep()
Example #9
0
 def test_appdetails(self):
     win = get_test_window_appdetails()
     self.addCleanup(win.destroy)