forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dev-python/google-apputils: fix tests
Package-Manager: Portage-2.3.6_p7, Repoman-2.3.2_p75
- Loading branch information
Showing
2 changed files
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
Prevent the environment from being clobbered during sh_test | ||
|
||
diff --git a/tests/sh_test.py b/tests/sh_test.py | ||
index ab41055..d1b08c6 100644 | ||
--- a/tests/sh_test.py | ||
+++ b/tests/sh_test.py | ||
@@ -29,12 +29,8 @@ class ShellScriptTests(basetest.TestCase): | ||
path_with_python = ':'.join(( | ||
os.path.dirname(sys.executable), os.environ.get('PATH'))) | ||
|
||
- env = { | ||
- 'PATH': path_with_python, | ||
- # Setuptools puts dependency eggs in our path, so propagate that. | ||
- 'PYTHONPATH': os.pathsep.join(sys.path), | ||
- 'TEST_TMPDIR': FLAGS.test_tmpdir, | ||
- } | ||
+ env = os.environ.copy() | ||
+ env['TEST_TMPDIR'] = FLAGS.test_tmpdir | ||
p = subprocess.Popen(sh_test_path, cwd=tests_path, env=env) | ||
self.assertEqual(0, p.wait()) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters