Merge lp:~chris.gagnon/autopilot/lp1182755 into lp:autopilot

Proposed by Chris Gagnon
Status: Merged
Approved by: Thomi Richards
Approved revision: 221
Merged at revision: 220
Proposed branch: lp:~chris.gagnon/autopilot/lp1182755
Merge into: lp:autopilot
Diff against target: 19 lines (+3/-1)
1 file modified
autopilot/tests/functional/test_autopilot_functional.py (+3/-1)
To merge this branch: bzr merge lp:~chris.gagnon/autopilot/lp1182755
Reviewer Review Type Date Requested Status
Thomi Richards (community) Approve
PS Jenkins bot continuous-integration Approve
Review via email: mp+165507@code.launchpad.net

Commit message

don't delete the /tmp/autopilot folder during functional tests if it already exists lp:1182755

Description of the change

don't delete the /tmp/autopilot directory if it already exists

To post a comment you must log in.
lp:~chris.gagnon/autopilot/lp1182755 updated
221. By Chris Gagnon

remove duplicate should_delete

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Thomi Richards (thomir-deactivatedaccount) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'autopilot/tests/functional/test_autopilot_functional.py'
2--- autopilot/tests/functional/test_autopilot_functional.py 2013-05-22 20:43:20 +0000
3+++ autopilot/tests/functional/test_autopilot_functional.py 2013-05-24 00:02:26 +0000
4@@ -425,12 +425,14 @@
5 """
6 ))
7
8- self.addCleanup(remove_if_exists, "/tmp/autopilot")
9+ should_delete = not os.path.exists('/tmp/autopilot')
10 code, output, error = self.run_autopilot(["run", "-r", "tests"])
11
12 self.assertThat(code, Equals(1))
13 self.assertTrue(os.path.exists('/tmp/autopilot'))
14 self.assertTrue(os.path.exists('/tmp/autopilot/tests.test_simple.SimpleTest.test_simple.ogv'))
15+ if should_delete:
16+ self.addCleanup(remove_if_exists, "/tmp/autopilot")
17
18 def test_record_dir_option_works(self):
19 """Must be able to specify record directory flag."""

Subscribers

People subscribed via source and target branches