Merge lp:~carla-sella/ubuntu-filemanager-app/fixed-test-cut-directory into lp:ubuntu-filemanager-app

Proposed by Carla Sella on 2015-03-07
Status: Merged
Approved by: Nicholas Skaggs on 2015-03-18
Approved revision: 397
Merged at revision: 398
Proposed branch: lp:~carla-sella/ubuntu-filemanager-app/fixed-test-cut-directory
Merge into: lp:ubuntu-filemanager-app
Diff against target: 219 lines (+43/-37)
2 files modified
po/com.ubuntu.filemanager.pot (+38/-37)
tests/autopilot/filemanager/tests/__init__.py (+5/-0)
To merge this branch: bzr merge lp:~carla-sella/ubuntu-filemanager-app/fixed-test-cut-directory
Reviewer Review Type Date Requested Status
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve on 2015-03-12
Nicholas Skaggs 2015-03-07 Pending
Review via email: mp+252205@code.launchpad.net

Commit Message

Autopilot test for Filemanager App

Description of the Change

Fixed problem with test_cut_directory the test failed with:
raceback (most recent call last):
  File "/home/phablet/autopilot/filemanager/tests/test_filemanager.py", line 355, in test_cut_directory
    os.mkdir(destination_dir_path)
FileExistsError: [Errno 17] File exists: '/home/phablet/destination'

To post a comment you must log in.
393. By Carla Sella on 2015-03-10

Added cleanup of temp directory at the begining of all tests.

Carla Sella (carla-sella) wrote :

Put the cleaning up of temp directory at the beginning of all tests.

394. By Carla Sella on 2015-03-10

Added cleanup at beginning of tests.

395. By Carla Sella on 2015-03-10

Fixed pep8 and pyflakes.

396. By Carla Sella on 2015-03-12

Put addCleanup in make_content_in_home.

397. By Carla Sella on 2015-03-12

Changed UCUbuntuShape with ShapeItem.

Nicholas Skaggs (nskaggs) wrote :

Is this finished?

Carla Sella (carla-sella) wrote :

Nicholas, yes this should only fix one of filemanager issues for failing tests, but before doing other things I would like to see if this fix also helps other tests not to fail.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'po/com.ubuntu.filemanager.pot'
2--- po/com.ubuntu.filemanager.pot 2015-02-13 14:09:47 +0000
3+++ po/com.ubuntu.filemanager.pot 2015-03-12 21:40:26 +0000
4@@ -8,7 +8,7 @@
5 msgstr ""
6 "Project-Id-Version: \n"
7 "Report-Msgid-Bugs-To: \n"
8-"POT-Creation-Date: 2015-01-07 00:30+0100\n"
9+"POT-Creation-Date: 2015-03-12 21:23+0100\n"
10 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
11 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
12 "Language-Team: LANGUAGE <LL@li.org>\n"
13@@ -27,12 +27,13 @@
14 msgstr[1] ""
15
16 #: ../src/app/qml/components/PathHistoryRow.qml:84
17-#: ../src/app/qml/ui/FolderListPage.qml:813
18+#: ../src/app/qml/ui/FolderListPage.qml:830
19 msgid "Device"
20 msgstr ""
21
22 #: ../src/app/qml/components/PlacesSidebar.qml:53
23-#: ../src/app/qml/ui/PlacesPage.qml:27 ../src/app/qml/ui/PlacesPopover.qml:102
24+#: ../src/app/qml/ui/FolderListPage.qml:31 ../src/app/qml/ui/PlacesPage.qml:27
25+#: ../src/app/qml/ui/PlacesPopover.qml:102
26 msgid "Places"
27 msgstr ""
28
29@@ -84,8 +85,8 @@
30 #: ../src/app/qml/ui/FileActionDialog.qml:45
31 #: ../src/app/qml/ui/FileOperationProgressDialog.qml:44
32 #: ../src/app/qml/ui/FolderListPage.qml:343
33-#: ../src/app/qml/ui/FolderListPage.qml:656
34-#: ../src/app/qml/ui/FolderListPage.qml:723
35+#: ../src/app/qml/ui/FolderListPage.qml:673
36+#: ../src/app/qml/ui/FolderListPage.qml:740
37 #: ../src/app/qml/ui/GoToDialog.qml:67
38 msgid "Cancel"
39 msgstr ""
40@@ -164,7 +165,7 @@
41
42 #: ../src/app/qml/ui/FolderListPage.qml:79
43 #: ../src/app/qml/ui/FolderListPage.qml:97
44-#: ../src/app/qml/ui/FolderListPage.qml:593
45+#: ../src/app/qml/ui/FolderListPage.qml:610
46 msgid "Properties"
47 msgstr ""
48
49@@ -219,123 +220,123 @@
50 msgid "Select"
51 msgstr ""
52
53-#: ../src/app/qml/ui/FolderListPage.qml:408
54+#: ../src/app/qml/ui/FolderListPage.qml:425
55 msgid "No files"
56 msgstr ""
57
58-#: ../src/app/qml/ui/FolderListPage.qml:428
59-#: ../src/app/qml/ui/FolderListPage.qml:554
60+#: ../src/app/qml/ui/FolderListPage.qml:445
61+#: ../src/app/qml/ui/FolderListPage.qml:571
62 msgid "Delete"
63 msgstr ""
64
65-#: ../src/app/qml/ui/FolderListPage.qml:429
66+#: ../src/app/qml/ui/FolderListPage.qml:446
67 #, qt-format
68 msgid "Are you sure you want to permanently delete '%1'?"
69 msgstr ""
70
71-#: ../src/app/qml/ui/FolderListPage.qml:434
72+#: ../src/app/qml/ui/FolderListPage.qml:451
73 msgid "Deleting files"
74 msgstr ""
75
76-#: ../src/app/qml/ui/FolderListPage.qml:452
77-#: ../src/app/qml/ui/FolderListPage.qml:567
78+#: ../src/app/qml/ui/FolderListPage.qml:469
79+#: ../src/app/qml/ui/FolderListPage.qml:584
80 msgid "Rename"
81 msgstr ""
82
83-#: ../src/app/qml/ui/FolderListPage.qml:453
84+#: ../src/app/qml/ui/FolderListPage.qml:470
85 msgid "Enter a new name"
86 msgstr ""
87
88-#: ../src/app/qml/ui/FolderListPage.qml:462
89+#: ../src/app/qml/ui/FolderListPage.qml:479
90 msgid "Could not rename"
91 msgstr ""
92
93-#: ../src/app/qml/ui/FolderListPage.qml:463
94+#: ../src/app/qml/ui/FolderListPage.qml:480
95 msgid "Insufficient permissions or name already exists?"
96 msgstr ""
97
98-#: ../src/app/qml/ui/FolderListPage.qml:481
99+#: ../src/app/qml/ui/FolderListPage.qml:498
100 msgid "Extract Archive"
101 msgstr ""
102
103-#: ../src/app/qml/ui/FolderListPage.qml:482
104+#: ../src/app/qml/ui/FolderListPage.qml:499
105 #, qt-format
106 msgid "Are you sure you want to extract '%1' here?"
107 msgstr ""
108
109-#: ../src/app/qml/ui/FolderListPage.qml:531
110+#: ../src/app/qml/ui/FolderListPage.qml:548
111 msgid "Cut"
112 msgstr ""
113
114-#: ../src/app/qml/ui/FolderListPage.qml:542
115+#: ../src/app/qml/ui/FolderListPage.qml:559
116 msgid "Copy"
117 msgstr ""
118
119-#: ../src/app/qml/ui/FolderListPage.qml:582
120-#: ../src/app/qml/ui/FolderListPage.qml:703
121+#: ../src/app/qml/ui/FolderListPage.qml:599
122+#: ../src/app/qml/ui/FolderListPage.qml:720
123 msgid "Extract archive"
124 msgstr ""
125
126-#: ../src/app/qml/ui/FolderListPage.qml:613
127+#: ../src/app/qml/ui/FolderListPage.qml:630
128 msgid "File operation error"
129 msgstr ""
130
131-#: ../src/app/qml/ui/FolderListPage.qml:644
132+#: ../src/app/qml/ui/FolderListPage.qml:661
133 #, qt-format
134 msgid "Extracting archive '%1'"
135 msgstr ""
136
137-#: ../src/app/qml/ui/FolderListPage.qml:665
138+#: ../src/app/qml/ui/FolderListPage.qml:682
139 msgid "OK"
140 msgstr ""
141
142-#: ../src/app/qml/ui/FolderListPage.qml:680
143+#: ../src/app/qml/ui/FolderListPage.qml:697
144 msgid "Extracting failed"
145 msgstr ""
146
147-#: ../src/app/qml/ui/FolderListPage.qml:681
148+#: ../src/app/qml/ui/FolderListPage.qml:698
149 #, qt-format
150 msgid "Extracting the archive '%1' failed."
151 msgstr ""
152
153-#: ../src/app/qml/ui/FolderListPage.qml:695
154+#: ../src/app/qml/ui/FolderListPage.qml:712
155 msgid "Archive file"
156 msgstr ""
157
158-#: ../src/app/qml/ui/FolderListPage.qml:696
159+#: ../src/app/qml/ui/FolderListPage.qml:713
160 msgid "Do you want to extract the archive here?"
161 msgstr ""
162
163-#: ../src/app/qml/ui/FolderListPage.qml:713
164+#: ../src/app/qml/ui/FolderListPage.qml:730
165 msgid "Open with another app"
166 msgstr ""
167
168-#: ../src/app/qml/ui/FolderListPage.qml:781
169+#: ../src/app/qml/ui/FolderListPage.qml:798
170 msgid "~/Desktop"
171 msgstr ""
172
173-#: ../src/app/qml/ui/FolderListPage.qml:791
174+#: ../src/app/qml/ui/FolderListPage.qml:808
175 msgid "~/Public"
176 msgstr ""
177
178-#: ../src/app/qml/ui/FolderListPage.qml:793
179+#: ../src/app/qml/ui/FolderListPage.qml:810
180 msgid "~/Programs"
181 msgstr ""
182
183-#: ../src/app/qml/ui/FolderListPage.qml:795
184+#: ../src/app/qml/ui/FolderListPage.qml:812
185 msgid "~/Templates"
186 msgstr ""
187
188-#: ../src/app/qml/ui/FolderListPage.qml:811
189+#: ../src/app/qml/ui/FolderListPage.qml:828
190 msgid "Home"
191 msgstr ""
192
193-#: ../src/app/qml/ui/FolderListPage.qml:881
194+#: ../src/app/qml/ui/FolderListPage.qml:898
195 msgid "Folder not accessible"
196 msgstr ""
197
198 #. TRANSLATORS: this refers to a folder name
199-#: ../src/app/qml/ui/FolderListPage.qml:883
200+#: ../src/app/qml/ui/FolderListPage.qml:900
201 #, qt-format
202 msgid "Can not access %1"
203 msgstr ""
204
205=== modified file 'tests/autopilot/filemanager/tests/__init__.py'
206--- tests/autopilot/filemanager/tests/__init__.py 2014-12-05 20:16:10 +0000
207+++ tests/autopilot/filemanager/tests/__init__.py 2015-03-12 21:40:26 +0000
208@@ -259,6 +259,11 @@
209 self.fakehome)
210 self.useFixture(temp_dir)
211 path = temp_dir.path
212+
213+ # putting ignore_errors=True to avoid tests failing when cutting or
214+ # deleting file or directory has already canceled the file or directory
215+ self.addCleanup(shutil.rmtree, path, ignore_errors=True)
216+
217 logger.debug('Directory Listing for HOME\n%s' %
218 os.listdir(self.fakehome))
219 self._assert_number_of_files(1)

Subscribers

People subscribed via source and target branches