Merge lp:~nskaggs/ubuntu-filemanager-app/fix-xauthority into lp:ubuntu-filemanager-app

Proposed by Nicholas Skaggs
Status: Merged
Approved by: Arto Jalkanen
Approved revision: 535
Merged at revision: 532
Proposed branch: lp:~nskaggs/ubuntu-filemanager-app/fix-xauthority
Merge into: lp:ubuntu-filemanager-app
Prerequisite: lp:~nskaggs/ubuntu-filemanager-app/add-dep-cache
Diff against target: 34 lines (+0/-18)
1 file modified
tests/autopilot/filemanager/tests/__init__.py (+0/-18)
To merge this branch: bzr merge lp:~nskaggs/ubuntu-filemanager-app/fix-xauthority
Reviewer Review Type Date Requested Status
Jenkins Bot continuous-integration Approve
Ubuntu File Manager Developers Pending
Review via email: mp+288838@code.launchpad.net

Commit message

Remove unneeded _copy_xauthority_file

Description of the change

Remove unneeded _copy_xauthority_file

To post a comment you must log in.
Revision history for this message
Jenkins Bot (ubuntu-core-apps-jenkins-bot) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'tests/autopilot/filemanager/tests/__init__.py'
--- tests/autopilot/filemanager/tests/__init__.py 2016-03-07 15:15:45 +0000
+++ tests/autopilot/filemanager/tests/__init__.py 2016-03-11 21:17:45 +0000
@@ -157,23 +157,6 @@
157 directory = registry.get_path(package_name)157 directory = registry.get_path(package_name)
158 return version, directory158 return version, directory
159159
160 def _copy_xauthority_file(self, directory):
161 """ Copy .Xauthority file to directory, if it exists in /home
162 """
163 # If running under xvfb, as jenkins does,
164 # xsession will fail to start without xauthority file
165 # Thus if the Xauthority file is in the home directory
166 # make sure we copy it to our temp home directory
167
168 xauth = os.path.expanduser(os.path.join(os.environ.get('HOME'),
169 '.Xauthority'))
170 if os.path.isfile(xauth):
171 logger.debug("Copying .Xauthority to %s" % directory)
172 shutil.copyfile(
173 os.path.expanduser(os.path.join(os.environ.get('HOME'),
174 '.Xauthority')),
175 os.path.join(directory, '.Xauthority'))
176
177 def patch_home(self):160 def patch_home(self):
178 """ mock /home for testing purposes to preserve user data161 """ mock /home for testing purposes to preserve user data
179 """162 """
@@ -188,7 +171,6 @@
188 temp_dir = temp_dir_fixture.path171 temp_dir = temp_dir_fixture.path
189172
190 # before we set fixture, copy xauthority if needed173 # before we set fixture, copy xauthority if needed
191 self._copy_xauthority_file(temp_dir)
192 self.useFixture(fixtures.EnvironmentVariable('HOME',174 self.useFixture(fixtures.EnvironmentVariable('HOME',
193 newvalue=temp_dir))175 newvalue=temp_dir))
194176

Subscribers

People subscribed via source and target branches