Merge lp:~nskaggs/ubuntu-calendar-app/remove-xauthority into lp:ubuntu-calendar-app

Proposed by Nicholas Skaggs on 2016-03-11
Status: Needs review
Proposed branch: lp:~nskaggs/ubuntu-calendar-app/remove-xauthority
Merge into: lp:ubuntu-calendar-app
Diff against target: 34 lines (+0/-18)
1 file modified
tests/autopilot/calendar_app/tests/__init__.py (+0/-18)
To merge this branch: bzr merge lp:~nskaggs/ubuntu-calendar-app/remove-xauthority
Reviewer Review Type Date Requested Status
Jenkins Bot continuous-integration Approve on 2016-03-23
Ubuntu Calendar Developers 2016-03-11 Pending
Review via email: mp+288836@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.
review: Approve (continuous-integration)

Unmerged revisions

769. By Nicholas Skaggs on 2016-03-11

remove _copy_xauthority_file

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/autopilot/calendar_app/tests/__init__.py'
2--- tests/autopilot/calendar_app/tests/__init__.py 2014-11-07 20:53:29 +0000
3+++ tests/autopilot/calendar_app/tests/__init__.py 2016-03-11 21:16:47 +0000
4@@ -83,23 +83,6 @@
5 "com.ubuntu.calendar",
6 emulator_base=ubuntuuitoolkit.UbuntuUIToolkitCustomProxyObjectBase)
7
8- def _copy_xauthority_file(self, directory):
9- """ Copy .Xauthority file to directory, if it exists in /home
10- """
11- # If running under xvfb, as jenkins does,
12- # xsession will fail to start without xauthority file
13- # Thus if the Xauthority file is in the home directory
14- # make sure we copy it to our temp home directory
15-
16- xauth = os.path.expanduser(os.path.join(os.environ.get('HOME'),
17- '.Xauthority'))
18- if os.path.isfile(xauth):
19- logger.debug("Copying .Xauthority to %s" % directory)
20- shutil.copyfile(
21- os.path.expanduser(os.path.join(os.environ.get('HOME'),
22- '.Xauthority')),
23- os.path.join(directory, '.Xauthority'))
24-
25 def patch_home(self):
26 """ mock /home for testing purposes to preserve user data
27 """
28@@ -117,7 +100,6 @@
29 temp_dir = temp_dir_fixture.path
30
31 # before we set fixture, copy xauthority if needed
32- self._copy_xauthority_file(temp_dir)
33 self.useFixture(fixtures.EnvironmentVariable('HOME',
34 newvalue=temp_dir))
35

Subscribers

People subscribed via source and target branches

to status/vote changes: