Merge lp:~ubuntu-sdk-team/ubuntu-ui-toolkit/noSpecialTreatmentForGalleryTests into lp:ubuntu-ui-toolkit/staging

Proposed by Christian Dywan on 2016-08-10
Status: Merged
Approved by: Zoltan Balogh on 2016-08-10
Approved revision: 2054
Merged at revision: 2054
Proposed branch: lp:~ubuntu-sdk-team/ubuntu-ui-toolkit/noSpecialTreatmentForGalleryTests
Merge into: lp:ubuntu-ui-toolkit/staging
Diff against target: 36 lines (+0/-20)
1 file modified
tests/autopilot/ubuntuuitoolkit/tests/gallery/__init__.py (+0/-20)
To merge this branch: bzr merge lp:~ubuntu-sdk-team/ubuntu-ui-toolkit/noSpecialTreatmentForGalleryTests
Reviewer Review Type Date Requested Status
ubuntu-sdk-build-bot continuous-integration Approve on 2016-08-10
Zoltan Balogh (community) 2016-08-10 Approve on 2016-08-10
Review via email: mp+302560@code.launchpad.net

Commit Message

Don't use a different .desktop file in the gallery tests

To post a comment you must log in.
Zoltan Balogh (bzoltan) wrote :

Works

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/autopilot/ubuntuuitoolkit/tests/gallery/__init__.py'
2--- tests/autopilot/ubuntuuitoolkit/tests/gallery/__init__.py 2015-10-04 13:20:26 +0000
3+++ tests/autopilot/ubuntuuitoolkit/tests/gallery/__init__.py 2016-08-10 14:09:26 +0000
4@@ -35,7 +35,6 @@
5 def setUp(self):
6 self.test_source_path = self._get_test_source_path()
7 self.test_qml_file_path = self._get_test_qml_file_path()
8- self.desktop_file_path = self._get_desktop_file_path()
9
10 if self.should_simulate_device():
11 # Hide the Unity7 launcher because it takes space that might be
12@@ -102,25 +101,6 @@
13 return '/usr/lib/{}/qt5/examples//ubuntu-ui-toolkit/examples/' \
14 'ubuntu-ui-toolkit-gallery'.format(host_multiarch)
15
16- def _get_desktop_file_path(self):
17- desktop_file_path = os.path.join(
18- self.test_source_path,
19- 'ubuntu-ui-toolkit-gallery.desktop')
20- if self._application_source_exists():
21- local_desktop_file_dir = (
22- ubuntuuitoolkit.tests.get_local_desktop_file_directory())
23- if not os.path.exists(local_desktop_file_dir):
24- os.makedirs(local_desktop_file_dir)
25- local_desktop_file_path = os.path.join(
26- local_desktop_file_dir, 'ubuntu-ui-toolkit-gallery.desktop')
27- shutil.copy(desktop_file_path, local_desktop_file_path)
28- # We can't delete the desktop file before we close the application,
29- # so we save it on an attribute to be deleted on tear down.
30- self.local_desktop_file_path = local_desktop_file_path
31- return local_desktop_file_path
32- else:
33- return desktop_file_path
34-
35 def open_page(self, page):
36 """Open a page of the widget gallery.
37

Subscribers

People subscribed via source and target branches