Merge lp:~gary/launchpad/small into lp:launchpad

Proposed by Gary Poster
Status: Merged
Approved by: Gary Poster
Approved revision: no longer in the source branch.
Merged at revision: not available
Proposed branch: lp:~gary/launchpad/small
Merge into: lp:launchpad
Diff against target: 23 lines (+6/-7)
1 file modified
lib/canonical/launchpad/scripts/tests/test_logger.txt (+6/-7)
To merge this branch: bzr merge lp:~gary/launchpad/small
Reviewer Review Type Date Requested Status
Abel Deuring (community) code Approve
Review via email: mp+23052@code.launchpad.net

Commit message

update a test to work with the new buildout approach. Problem only exhibited in some circumstances.

Description of the change

This branch updates a test to work with the new buildout approach: you only need to include parts/scripts in PYTHONPATH in order to get the dependencies included, and PYTHONPATH is in fact already set up for you. Before my branch, this test failed only under certain circumstances, which is why it was not caught earlier.

To post a comment you must log in.
Revision history for this message
Abel Deuring (adeuring) :
review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'lib/canonical/launchpad/scripts/tests/test_logger.txt'
--- lib/canonical/launchpad/scripts/tests/test_logger.txt 2009-06-12 16:36:02 +0000
+++ lib/canonical/launchpad/scripts/tests/test_logger.txt 2010-04-08 22:13:22 +0000
@@ -7,13 +7,12 @@
7 ... import sys7 ... import sys
8 ... import subprocess8 ... import subprocess
9 ... from canonical.config import config9 ... from canonical.config import config
10 ... # We want to make sure that the subprocess will have the benefit10 ... if 'env' in kw:
11 ... # of all of the dependency paths inserted by the buildout.11 ... # We want to make sure that the subprocess will have the
12 ... # We pass them via PYTHONPATH.12 ... # benefit of all of the dependency paths inserted by the
13 ... env = kw.get('env')13 ... # buildout. This is already set up in our environment's
14 ... if env is None:14 ... # PYTHONPATH, so use it.
15 ... kw['env'] = env = dict(os.environ)15 ... kw['env']['PYTHONPATH'] = os.environ['PYTHONPATH']
16 ... env['PYTHONPATH'] = os.path.pathsep.join(sys.path)
17 ... test_script_path = os.path.join(16 ... test_script_path = os.path.join(
18 ... config.root, 'lib', 'canonical', 'launchpad',17 ... config.root, 'lib', 'canonical', 'launchpad',
19 ... 'scripts', 'tests', 'loglevels.py')18 ... 'scripts', 'tests', 'loglevels.py')