Call launch_test_application outside AutopilotTestCase

Bug #1291531 reported by Víctor R. Ruiz
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Autopilot
Fix Released
Medium
Unassigned
autopilot (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

While refactoring the test code of some applications, we are moving calls outside the tests to helpers.py. Right now, to use launch_test_application() it requires an AutopilotTestCase. That blocks starting an application on a function in helpers.py, which is not an instance of AutopilotTestCase. In other words, there is no way to easily launch an application with testatibility enabled and returning the proxy object.

Related branches

Changed in autopilot:
status: New → Triaged
importance: Undecided → Medium
Leo Arias (elopio)
description: updated
Revision history for this message
Leo Arias (elopio) wrote :

We would like _launch_test_application to be a function in a module, instead of a method in AutopilotTestCase.
With that, we would be able to make helper objects that encapsulate the logic about how to open them. We could just instantiate something like

system_settings_app = ubuntu_system_settings.SystemSettingsApp(launch=True) from any test that needs to interact with system settings.
We could wrap that into a fixture, so the app is closed when it's no longer needed and all the changes to the settings are reverted.

But currently this doesn't look as nice as it should because we need to pass the test case object as a parameter to everything with no real reason.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

Fix committed into lp:~autopilot/autopilot/temp-dev at revision 517, scheduled for release in autopilot, milestone Unknown

Changed in autopilot:
status: Triaged → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package autopilot - 1.5.0+14.10.20140526.1-0ubuntu1

---------------
autopilot (1.5.0+14.10.20140526.1-0ubuntu1) utopic; urgency=low

  [ Tarmac ]
  * Add fixtures for launching applications. (LP: #1322033, #1291531,
    #1320149)
 -- Ubuntu daily release <email address hidden> Mon, 26 May 2014 12:50:10 +0000

Changed in autopilot (Ubuntu):
status: New → Fix Released
Changed in autopilot:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.