Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(501)

Unified Diff: gmerge_test.py

Issue 6839028: Fix gmerge unittest to pass use through environment. (Closed) Base URL: http://git.chromium.org/git/dev-util.git@master
Patch Set: Fix Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gmerge_test.py
diff --git a/gmerge_test.py b/gmerge_test.py
index eab886c57f3b9a50b74dc1bce1817d7b973c98e7..912d8cc0248fd8995e27f437dc3df732e10a18ac 100755
--- a/gmerge_test.py
+++ b/gmerge_test.py
@@ -7,6 +7,7 @@
"""Unit tests for gmerge."""
import gmerge
+import os
import unittest
class Flags(object):
@@ -29,13 +30,15 @@ class GMergeTest(unittest.TestCase):
merger.lsb_release)
def testPostData(self):
- gmerge.FLAGS = Flags({'use': 'a b c d +e',
- 'accept_stable': 'blah'})
+ original_use = os.environ.get('USE', '')
+ os.environ['USE'] = 'a b c d +e'
+ gmerge.FLAGS = Flags({'accept_stable': 'blah'})
merger = gmerge.GMerger(self.lsb_release_lines)
self.assertEqual(
'use=a+b+c+d+%2Be&pkg=package_name&board=x86-mario&accept_stable=blah',
merger.GeneratePackageRequest('package_name'))
+ os.environ['USE'] = original_use
if __name__ == '__main__':
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698